Hi Konrád (The original enquirer?),

From: "Paul Smith" <p...@mad-scientist.net>
On Thu, 2015-07-23 at 01:23 -0700, Konrád Lőrinczi wrote:
I should somehow ignore atime and mtime when doing diff for status.

Just to be clear, what this would involve is for every file in the
Git would have to extract the HEAD version into a temporary file (or
memory buffer) then compare it to what's currently in the work tree.

I've added a reply to the https://github.com/msysgit/git/issues/312
basically changing the problem from, one of getting Git to _auto_ detect
such an issue, to one where the user is responsible for forcing the
staging of such a file that they know they have fudged.

In the response I thought that it may need coding but now I suspect that
it can be done via a 'git-hash-object' and a 'git-update-index
--index-info', but it probably requires better minds than me to confirm
the required stage # so that you have essentially done a
'git add --forced -- <path>' (who's option does not exist, and would possibly be called --ignore-stat)

Given that the whole of git started as a few scripts, it should still be possible, but would need a shift of mental image - an XY_problem.

I'm not saying that such a thing should be impossible; adding some
of flag that does this sort of 100% reliable check could be useful.
But, it's not surprising that no one would want to use such a flag
hence why it's not implemented now).

Of course, you could write a script that would do this yourself, and
explicitly "git add" any file determined to be changed.

I wonder if it wouldn't be simpler to just modify the tool you're
so it doesn't reset the timestamp on the file in the first place...


You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to