On Thu, Aug 27, 2015 at 12:40 PM, Enzo Chi <enzo.chi...@gmail.com> wrote:
> I think git track executable permission, right?
> If so, files in git is "read only" and "not deployment too", why it track
> "x" permission?
x permissions alter the functionality of the file.
For example, if you have a build system that needs scripts to build and
those scripts need to be x, then the x better be stored or the scripts are
> Keep "read only" permission is useful in some scenario. And most important
> thing is there's on harm to keep it (I am not a software developer, correct
> me if I am wrong)?
That does not achieve anything from a safety perspective. If you lose/alter
a file then you just checkout the version in HEAD again.
Getting r/w permissions right would be hell anyway.
Start with a readonly file.
Now I need to change it, so I make is locally writable and change it.
Then I do a commit and push it again. Oops! I forgot to make it read only
again before I pushed it, so now it is writable in the repo too.
Better to just dodge this hangover by not having r/w.
> On Thursday, August 27, 2015 at 6:55:55 AM UTC+10, Philip Oakley wrote:
>> I have post an question at
>> I just want to know why GIT doesn't track read/write permission?
>> What I want is just GIT keep what every I checked in? ( I am OK with the
>> executable permission control)
>> It's sort of a philosophical issue. If you are placing a file into a
>> repository, it is by definition "read only". You can never 'write' the same
>> revision, but with a different content - it would be a contradiction. Hence
>> the r/w flags are ignored.
>> It's important to remember that as concieved, Git is not a deployment
>> tool, so it didn't need r/w permissions, and as open source DVCS,
>> everything checked out would be local so the user would have full control,
>> so read-only couldn't be relied on anyway, and we hope the user will
>> contribute a change/improvement so 'write' it is!
>> Likewise it doesn't store timestamps (of the files) either..
>> There is a Linus 'rant' somewhere on the issue..
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.