All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dennis Kaarsemaker <dennis@kaarsemaker.net>
To: git <git@vger.kernel.org>
Subject: Reset sometimes updates mtime
Date: Thu, 09 Jul 2015 16:02:14 +0200	[thread overview]
Message-ID: <1436450534.15519.49.camel@kaarsemaker.net> (raw)

I'm seeing some behaviour with git reset that I find odd. Basically if I
do

git fetch && \
git reset --hard simple-tag-that-points-to-the-current-commit

sometimes the reset will update the mtime of all files and directories
in the repo and sometimes it will leave them alone. Changing it to

git fetch && \
git status && \
git reset --hard simple-tag-that-points-to-the-current-commit

Cause the mtime update to reliably not happen.

Bad thing is that I am relying on the mtime updates not to happen if the
files don't actually change. Is this an assumption I can safely make? If
it is, then I'll debug further (e.g. I don't even know yet if the file
gets rewritten or just touched, why the index gets updated as well
etc.).

-- 
Dennis Kaarsemaker
http://www.kaarsemaker.net

             reply	other threads:[~2015-07-09 14:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09 14:02 Dennis Kaarsemaker [this message]
2015-07-09 17:56 ` Reset sometimes updates mtime Junio C Hamano
2015-07-10  7:30   ` Dennis Kaarsemaker

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=1436450534.15519.49.camel@kaarsemaker.net \
    --to=dennis@kaarsemaker.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.