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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11344 in the body.
You can then email your comments to 11344 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11344; Package emacs. (Thu, 26 Apr 2012 05:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 26 Apr 2012 05:29:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11344; Package emacs. (Thu, 26 Apr 2012 08:32:01 GMT) Full text and rfc822 format available.

Message #8 received at 11344 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Leo <sdl.web <at> gmail.com>
Cc: 11344 <at> debbugs.gnu.org
Subject: Re: bug#11344: 24.0.95; vc-git-state bug
Date: Thu, 26 Apr 2012 10:30:45 +0200
Leo <sdl.web <at> gmail.com> writes:

> 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

What is your git version?  When I try this I don't get the diff header.

(There is still some breakage that appears to be a git regression, in
that it outputs an extra NUL.)

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11344; Package emacs. (Thu, 26 Apr 2012 08:46:02 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#11344: 24.0.95; vc-git-state bug
Date: Wed, 25 Apr 2012 21:11:32 +0800
On 2012-04-26 16:30 +0800, Andreas Schwab wrote:
> What is your git version?  When I try this I don't get the diff header.
>
> (There is still some breakage that appears to be a git regression, in
> that it outputs an extra NUL.)

I get the same bug with git 1.7.7.5 and 1.7.10.

Leo





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11344; Package emacs. (Thu, 26 Apr 2012 09:32:01 GMT) Full text and rfc822 format available.

Message #14 received at 11344 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Leo <sdl.web <at> gmail.com>
Cc: 11344 <at> debbugs.gnu.org
Subject: Re: bug#11344: 24.0.95; vc-git-state bug
Date: Thu, 26 Apr 2012 11:30:46 +0200
Leo <sdl.web <at> gmail.com> writes:

> 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

I was able to reproduce that with git 1.7.7.  Fixed in emacs-24.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Reply sent to Andreas Schwab <schwab <at> linux-m68k.org>:
You have taken responsibility. (Thu, 26 Apr 2012 09:34:01 GMT) Full text and rfc822 format available.

Notification sent to Leo <sdl.web <at> gmail.com>:
bug acknowledged by developer. (Thu, 26 Apr 2012 09:34:02 GMT) Full text and rfc822 format available.

Message #19 received at 11344-done <at> debbugs.gnu.org (full text, mbox):

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



bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 24 May 2012 11:24:03 GMT) Full text and rfc822 format available.

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.