GithubHelp home page GithubHelp logo

Comments (13)

akzhan avatar akzhan commented on June 17, 2024

Will be done using file_mode parameter.

https://github.com/akzhan/git-commit-notifier/commit/0d4417972c0aa1bf64b6301d4ba792f2ab8de094

pull request sent.

from git-commit-notifier.

ened avatar ened commented on June 17, 2024

Thanks

from git-commit-notifier.

akzhan avatar akzhan commented on June 17, 2024

Take a note that file mode is Unix-specific functionality.

I suppose that default behaviour (operating system and umask dependent) is optimal one.

So we need to allow users override default settings in rare cases like issue #56.

from git-commit-notifier.

bitboxer avatar bitboxer commented on June 17, 2024

I don't like this approach using a parameter. We should think about:

  • why do we need this file anyway? is there a more elegant solution?
  • would be 664 a better default?
  • if not, can we get the file mode form another file in the repo and copy it?

from git-commit-notifier.

ened avatar ened commented on June 17, 2024

My users have a new umask set to 002 - I'm not completely in favor of that solution but it might work. I let you know if its any useful to us.

from git-commit-notifier.

akzhan avatar akzhan commented on June 17, 2024

This file(s) stores previously handled commits. This logic in codebase very old. I can't answer yet is it required.

People uses default settings and all work great in usual cases. So 0664 is not good default.

Yes, we can get file mode from old version of file and set it on new version of file (current logic is creation of file and replacing of the old one in one atomic operation).

from git-commit-notifier.

bitboxer avatar bitboxer commented on June 17, 2024

No I don't mean to copy the file mode from the old version of the same file, I meant to copy the file mode from another file that is laying there in the repo since all git users must have the rights for those other files, too.

from git-commit-notifier.

ened avatar ened commented on June 17, 2024

Yes: "Yes, we can get file mode from old version of file and set it on new version of file (current logic is creation of file and replacing of the old one in one atomic operation)."

That would solve my problem completely!

I just checked, the notifier is resetting the mode to 644, ignoring the umask.

from git-commit-notifier.

akzhan avatar akzhan commented on June 17, 2024

@bitboxer, @ened, - I'll update code to copy mode from old file to the new one?

It is most correct way i suppose.

from git-commit-notifier.

bitboxer avatar bitboxer commented on June 17, 2024

Copy the mode from which file? from the old file the system is recreating? Why not copy the file mode of another file in that repo? That way the first time the file is created the file mode will be correct.

from git-commit-notifier.

akzhan avatar akzhan commented on June 17, 2024

Yes I write about recreating only.

First run.. hm... which another file from?

from git-commit-notifier.

bitboxer avatar bitboxer commented on June 17, 2024

I don't know which file would be the best. What about the config-file? Or go into the objects dir and get the first file there and copy it's file mode.

from git-commit-notifier.

krunkosaurus avatar krunkosaurus commented on June 17, 2024

Again, any updates on this guys? :)

from git-commit-notifier.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.