From: Jakub Narebski <jnareb@gmail.com>
To: snk <shank76@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: preserve permissions?
Date: Sat, 03 Mar 2012 11:15:58 -0800 (PST) [thread overview]
Message-ID: <m3wr71ts0i.fsf@localhost.localdomain> (raw)
In-Reply-To: <1330801530552-7340464.post@n2.nabble.com>
snk <shank76@gmail.com> 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
next prev parent reply other threads:[~2012-03-03 19:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 12:29 preserve permissions? Jonathan Chetwynd
2010-05-04 13:08 ` Jakub Narebski
2012-03-03 19:05 ` snk
2012-03-03 19:15 ` Jakub Narebski [this message]
2010-05-04 18:44 ` Andrew Keller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3wr71ts0i.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=shank76@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).