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

6 messages from 2008-02-22 to 2008-02-29. Participants: Rémi Vanicat, Remi Vanicat, Alexandre Julliard, Junio C Hamano, Xavier Maillard.
Thread: https://gitlist.dev/t/12263

## Rémi Vanicat, 2008-02-22 21:45

Subject: [PATCH] git.el: find the git-status buffer whatever its name is
Message-ID: <87hcg0fyxe.dlv@maison.homelinux.org>
URL: https://gitlist.dev/e/87hcg0fyxe.dlv%40maison.homelinux.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>
---
 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

```

## Remi Vanicat, 2008-02-28 12:58

Subject: Re: [PATCH] git.el: find the git-status buffer whatever its name is
Message-ID: <87skzd44qn.dlv@maison.homelinux.org>
URL: https://gitlist.dev/e/87skzd44qn.dlv%40maison.homelinux.org
In-Reply-To: <87hcg0fyxe.dlv@maison.homelinux.org>

```
Any comment on this bug fix ? It seem it was forgotten.
I re-include it for convenience:


From 8ab57162a69c178dbc04bc4f94271e36ee9d120a Mon Sep 17 00:00:00 2001
From: Rémi Vanicat <vanicat@debian.org>
Date: Fri, 22 Feb 2008 22:36:23 +0100
Subject: [PATCH] git.el: find the git-status buffer whatever its name is

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.
---
 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

```

## Alexandre Julliard, 2008-02-28 14:03

Subject: Re: [PATCH] git.el: find the git-status buffer whatever its name is
Message-ID: <871w6x2n5e.fsf@wine.dyndns.org>
URL: https://gitlist.dev/e/871w6x2n5e.fsf%40wine.dyndns.org
In-Reply-To: <87skzd44qn.dlv@maison.homelinux.org>

```
Remi Vanicat <vanicat@debian.org> writes:

> Any comment on this bug fix ? It seem it was forgotten.
> I re-include it for convenience:

Looks good to me.

-- 
Alexandre Julliard
julliard@winehq.org

```

## Junio C Hamano, 2008-02-28 20:14

Subject: Re: [PATCH] git.el: find the git-status buffer whatever its name is
Message-ID: <7vprugj0t2.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vprugj0t2.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <87skzd44qn.dlv@maison.homelinux.org>

```
Remi Vanicat <vanicat@debian.org> writes:

> Any comment on this bug fix ? It seem it was forgotten.
> I re-include it for convenience:

It is very cumbersome to apply if you "include everything
inside", so please don't do this.

Instead, send as if it is a new patch, adding Acked-by: by Alexandre
after your Signed-off-by: line.

> From 8ab57162a69c178dbc04bc4f94271e36ee9d120a Mon Sep 17 00:00:00 2001
> From: Rémi Vanicat <vanicat@debian.org>
> Date: Fri, 22 Feb 2008 22:36:23 +0100
> Subject: [PATCH] git.el: find the git-status buffer whatever its name is
>
> 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.
> ---
>  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

```

## Xavier Maillard, 2008-02-29 02:00

Subject: Re: [PATCH] git.el: find the git-status buffer whatever its name is
Message-ID: <200802290200.m1T20MGr018035@localhost.localdomain>
URL: https://gitlist.dev/e/200802290200.m1T20MGr018035%40localhost.localdomain
In-Reply-To: <87skzd44qn.dlv@maison.homelinux.org>

```

   Any comment on this bug fix ? It seem it was forgotten.
   I re-include it for convenience:

Tested here, it works like a champ.

	Xavier
-- 
http://www.gnu.org
http://www.april.org
http://www.lolica.org

```

## Rémi Vanicat, 2008-02-29 18:28

Subject: [PATCH] git.el: find the git-status buffer whatever its name is
Message-ID: <87wson1ut8.dlv@maison.homelinux.org>
URL: https://gitlist.dev/e/87wson1ut8.dlv%40maison.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

```
