# [BUG] git bisect should not expand file globs in log

4 messages from 2008-02-12 to 2008-02-12. Participants: Frans Pop, Johannes Schindelin, Alex Riesen.
Thread: https://gitlist.dev/t/12061

## Frans Pop, 2008-02-12 19:23

Subject: [BUG] git bisect should not expand file globs in log
Message-ID: <200802122023.28879.elendil@planet.nl>
URL: https://gitlist.dev/e/200802122023.28879.elendil%40planet.nl

```
Hi,

During a git bisect session I ended up with the following in the
.git/BISECT_LOG:

# bad: [38a382ae5dd4f4d04e3046816b0a41836094e538] Kobject: convert 
arch/alpha arch/arm arch/avr32 arch/blackfin arch/cris arch/frv arch/h8300 
arch/ia64 arch/m32r arch/m68k arch/m68knommu arch/mips arch/parisc 
arch/powerpc arch/ppc arch/s390 arch/sh arch/sh64 arch/sparc arch/sparc64 
arch/um arch/v850 arch/x86 arch/x86_64 arch/xtensa from 
kobject_unregister() to kobject_put()
git-bisect bad 38a382ae5dd4f4d04e3046816b0a41836094e538

>From the following command you can see shat happened: the 'arch/*' from the 
commit log was expanded in the comment line in the bisect log file.

$ git bisect bad
38a382ae5dd4f4d04e3046816b0a41836094e538 is first bad commit
commit 38a382ae5dd4f4d04e3046816b0a41836094e538
Author: Greg Kroah-Hartman <gregkh@suse.de>
Date:   Thu Dec 20 08:13:05 2007 -0800

    Kobject: convert arch/* from kobject_unregister() to kobject_put()

git version: 1.5.4 (current Debian unstable)

Cheers,
FJP

```

## Johannes Schindelin, 2008-02-12 19:50

Subject: Re: [BUG] git bisect should not expand file globs in log
Message-ID: <alpine.LSU.1.00.0802121950210.3870@racer.site>
URL: https://gitlist.dev/e/alpine.LSU.1.00.0802121950210.3870%40racer.site
In-Reply-To: <200802122023.28879.elendil@planet.nl>

```
Hi,

does this help?  (It is a really trivial patch...)

-- snipsnap --
[PATCH] bisect: use verbatim commit subject in the bisect log

Due to a typo, the commit subject was shell expanded in the bisect log.
That is, if you had some shell pattern in the commit subject, bisect
would happily put all matching file names into the log.

Noticed by Frans Pop.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 git-bisect.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-bisect.sh b/git-bisect.sh
index 5385249..0bb51d7 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -131,7 +131,7 @@ bisect_write() {
 		*)		die "Bad bisect_write argument: $state" ;;
 	esac
 	git update-ref "refs/bisect/$tag" "$rev"
-	echo "# $state: "$(git show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
+	echo "# $state: $(git show-branch $rev)" >>"$GIT_DIR/BISECT_LOG"
 	test -z "$nolog" && echo "git-bisect $state $rev" >>"$GIT_DIR/BISECT_LOG"
 }
 
-- 
1.5.4.18.gb6d712

```

## Alex Riesen, 2008-02-12 20:06

Subject: [PATCH] Fix shell quoting in git-bisect
Message-ID: <20080212200650.GA15258@steel.home>
URL: https://gitlist.dev/e/20080212200650.GA15258%40steel.home
In-Reply-To: <200802122023.28879.elendil@planet.nl>

```
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
Frans Pop, Tue, Feb 12, 2008 20:23:28 +0100:
> During a git bisect session I ended up with the following in the
> .git/BISECT_LOG:
> 
> # bad: [38a382ae5dd4f4d04e3046816b0a41836094e538] Kobject: convert 
> arch/alpha arch/arm arch/avr32 arch/blackfin arch/cris arch/frv arch/h8300 
> ...
> 
> From the following command you can see shat happened: the 'arch/*' from the 
> commit log was expanded in the comment line in the bisect log file.

This should fix it

 git-bisect.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-bisect.sh b/git-bisect.sh
index 5385249..0bb51d7 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -131,7 +131,7 @@ bisect_write() {
 		*)		die "Bad bisect_write argument: $state" ;;
 	esac
 	git update-ref "refs/bisect/$tag" "$rev"
-	echo "# $state: "$(git show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
+	echo "# $state: $(git show-branch $rev)" >>"$GIT_DIR/BISECT_LOG"
 	test -z "$nolog" && echo "git-bisect $state $rev" >>"$GIT_DIR/BISECT_LOG"
 }
 
-- 
1.5.4.1.112.g94408

```

## Frans Pop, 2008-02-12 21:10

Subject: Re: [BUG] git bisect should not expand file globs in log
Message-ID: <200802122210.50990.elendil@planet.nl>
URL: https://gitlist.dev/e/200802122210.50990.elendil%40planet.nl
In-Reply-To: <alpine.LSU.1.00.0802121950210.3870@racer.site>

```
On Tuesday 12 February 2008, you wrote:
> does this help?  (It is a really trivial patch...)

Yes, it does. Thanks.

You beat Alex by about 15 minutes. If I'd known this was just shell script, 
I could've done the patch myself :-P

> [PATCH] bisect: use verbatim commit subject in the bisect log
>
> Due to a typo, the commit subject was shell expanded in the bisect log.
> That is, if you had some shell pattern in the commit subject, bisect
> would happily put all matching file names into the log.
>
> Noticed by Frans Pop.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Tested-by: Frans Pop <elendil@planet.nl>

```
