Subject: bug#1067: 23.0.60; vc-dir (git): doesn't update "branch" line

From: Dan Nicolaescu <[email-masked]>
Date: Thu, 2 Oct 2008 16:47:54 -0700 (PDT)

Eric Hanchrow <[email-masked]> writes:

  > Please write in English if possible, because the Emacs maintainers
  > usually do not have translators to read other languages for them.
  > 
  > Your bug report will be posted to the [email-masked] mailing list.
  > 
  > Please describe exactly what actions triggered the bug
  > and the precise symptoms of the bug:
  > 
  > * I started Emacs in a git working tree, whose checked-out branch was
  >   named "master":
  > 
  >     $ cd /usr/local/src/emacs-via-git/src
  >     $ git branch
  >     * master
  >     $ ./emacs -Q -nw
  > 
  > * I ran vc-dir by typing C-x v d, and noticed that the output was
  >   correct: in particular, it said "Branch : master"
  > 
  > * I created, and switched to, a new branch, by typing 
  > 
  >     M-! git checkout -b fred RET
  > 
  > * I "refreshed" the *vc-dir* buffer by typing g ("revert-buffer").  I
  >   noticed that it _still_ said "Branch : master".  This is the bug; I
  >   expected to see "Branch : fred".
  > 
  > * I killed the *vc-dir* buffer with C-x k RET, then recreated it with
  >   C-x v d.  This time, I saw "Branch : fred", as I expected.

`vc-dir-refresh' needs to recompute the header for vc-ewoc (i.e. run
(vc-dir-headers vc-dir-backend default-directory) )
and put the result back in the ewoc.

Do you want to take a stab at it?