GNU bug report logs - #11344
24.0.95; vc-git-state bug

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Leo <sdl.web <at> gmail.com>
Subject: bug#11344: closed (Re: bug#11344: 24.0.95; vc-git-state bug)
Date: Thu, 26 Apr 2012 09:34:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#11344: 24.0.95; vc-git-state bug

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 11344 <at> debbugs.gnu.org.

-- 
11344: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11344
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Andreas Schwab <schwab <at> linux-m68k.org>
To: 11344-done <at> debbugs.gnu.org
Subject: Re: bug#11344: 24.0.95; vc-git-state bug
Date: Thu, 26 Apr 2012 11:32:03 +0200

[Message part 3 (message/rfc822, inline)]
From: Leo <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.95; vc-git-state bug
Date: Thu, 26 Apr 2012 13:26:55 +0800
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 31 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.