Re: preserve permissions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



snk <shank76@xxxxxxxxx> writes:

> > Therefore git does not store ownership, and only basic permissions 
> > (only executable bit for ordinary files, and the symlink bit). 
> 
> Fine.  "git diff" reports wrong new permissions though: 755 instead of 764. 

"Executable bit" is not "executable permissions"
 
> shanker@linux-0tix:~/test/play2> git reset --hard HEAD
> HEAD is now at 85d4483 test
> shanker@linux-0tix:~/test/play2> git config core.filemode
> true
> shanker@linux-0tix:~/test/play2> ls -l x
> -rw-rw-r-- 1 shanker users 0 Mar  3 11:00 x
> shanker@linux-0tix:~/test/play2> chmod u+x x
> shanker@linux-0tix:~/test/play2> git diff x
> diff --git a/x b/x
> old mode 100644
> new mode 100755
> shanker@linux-0tix:~/test/play2> ls -l x
> -rwxrw-r-- 1 shanker users 0 Mar  3 11:00 x
> shanker@linux-0tix:~/test/play2> 

Git stores only whether file is executable or not.  To be more exact
git uses only a few modes: one for submodule (commit), one for
directory, one for symbolic link, one for ordinary executable file,
and one for ordinary file (non-executable).

-- 
Jakub Narebski

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]