git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git.el: find the git-status buffer whatever its name is

From
Rémi Vanicat <vanicat@debian.org>
Date
Feb 29, 2008, 18:28 UTC
Message-ID
<87wson1ut8.dlv@maison.homelinux.org>
In-Reply-To
<7vprugj0t2.fsf@gitster.siamese.dyndns.org>
git-status used the buffer name to find git-status buffers, and that
could failed if the buffer had another name, for example when multiple
working directories was tracked.
Signed-off-by: Rémi Vanicat <vanicat@debian.org>
Acked-by: Alexandre Julliard <julliard@winehq.org>
Tested-by: Xavier Maillard <xma@gnu.org>
---
Resend as requested
 contrib/emacs/git.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index f69b697..14a1601 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -1545,7 +1545,7 @@ Commands:
         (with-current-buffer buffer
           (when (and list-buffers-directory
                      (string-equal fulldir (expand-file-name list-buffers-directory))
-                     (string-match "\\*git-status\\*$" (buffer-name buffer)))
+		     (eq major-mode 'git-status-mode))
             (setq found buffer))))
       (setq list (cdr list)))
     found))
-- 
1.5.4.2.191.g7b407


-- 
Rémi Vanicat



-- 
Rémi Vanicat
Previous: Junio C HamanoNext: Xavier Maillard
Message 5 of 6 in “git.el: find the git-status buffer whatever its name is”
  1. git.el: find the git-status buffer whatever its name isRémi Vanicat, Feb 22, 2008
  2. Remi VanicatFeb 28, 2008
  3. Alexandre JulliardFeb 28, 2008
  4. Junio C HamanoFeb 28, 2008
  5. git.el: find the git-status buffer whatever its name isRémi Vanicat, Feb 29, 2008
  6. Xavier MaillardFeb 29, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.