git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Keeping <john@keeping.me.uk>
To: Alexander Nestorov <alexandernst@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: [Request] Git reset should be able to ignore file permissions
Date: Tue, 18 Jun 2013 15:01:20 +0100	[thread overview]
Message-ID: <20130618140120.GD4676@serenity.lan> (raw)
In-Reply-To: <CACuz9s31OUWNxTqCmj7ukAo7=TpXK7zBv5kTFZ5obpXKOju9ng@mail.gmail.com>

On Tue, Jun 18, 2013 at 03:25:22PM +0200, Alexander Nestorov wrote:
> Recently I had to write some automation scripts and I found
> that git reset --hard actually restores each file's permissions.
> 
> That is causing both the created and the last-modified dates
> of the file to get changed to the time of the git reset.
> 
> This behavior is easy to demonstrate:
> 
> echo "test" > myfile
> chmod 777 myfile
> git add myfile && git commit -m "Test" && git push
> chmod 775 myfile
> git reset --hard origin/master
> 
> After the git reset --hard command, the entire file was
> checkout-ed. Instead, git should be able to check if the
> content of the file changed and only if it did, check it out.

Does "git reset --keep" behave in the same way?  I would expect it to
leave permissions as they were.

  parent reply	other threads:[~2013-06-18 14:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18 13:25 [Request] Git reset should be able to ignore file permissions Alexander Nestorov
2013-06-18 13:34 ` Matthieu Moy
2013-06-18 13:48   ` Alexander Nestorov
2013-06-18 14:06     ` Matthieu Moy
2013-06-18 14:22       ` Alexander Nestorov
2013-06-18 14:33         ` Matthieu Moy
2013-06-18 14:39           ` Alexander Nestorov
2013-06-18 15:51             ` Alexander Nestorov
2013-06-18 16:00               ` Matthieu Moy
2013-06-18 17:03                 ` Alexander Nestorov
2013-06-19  5:40                   ` Matthieu Moy
2013-06-19  8:00                     ` Alexander Nestorov
2013-06-19 11:37                       ` Matthieu Moy
2013-06-19 18:43                         ` Junio C Hamano
2013-06-20 13:28                           ` Alexander Nestorov
2013-06-19 16:40                       ` Hilco Wijbenga
2013-06-18 14:01 ` John Keeping [this message]
2013-06-18 14:05   ` Alexander Nestorov

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=20130618140120.GD4676@serenity.lan \
    --to=john@keeping.me.uk \
    --cc=alexandernst@gmail.com \
    --cc=git@vger.kernel.org \
    /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).