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.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html