GNU bug report logs -
#11344
24.0.95; vc-git-state bug
Previous Next
Reported by: Leo <sdl.web <at> gmail.com>
Date: Thu, 26 Apr 2012 05:29:02 UTC
Severity: normal
Found in version 24.0.95
Done: Andreas Schwab <schwab <at> linux-m68k.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
1. Open a file in a git repo
2. Insert any char and then delete it
3. Save
You will see emacs show in the mode-line "Git:<branch>" i.e. file is
modified. Because in this case, git diff-index -p --raw -z HEAD --
<file> outputs:
:100644 100644 c617ed851b3c4d332ab960b0f936c6c4fafce1b0 0000000000000000000000000000000000000000 MTODOdiff --git a/TODO b/TODO
The manual page of git-diff-index says:
<sha1> is shown as all 0's if a file is new on the filesystem and it
is out of sync with the index.
But showing it as modified is not helpful and is contradictory to
behaviour in other backends.
One possible solution is to run `git update-index -- <file>' before
running git diff-index as mentioned above. But I am not familiar with
git plumbing commands.
Leo
This bug report was last modified 13 years and 30 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.