threads / bug / 12061

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

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

## tl;dr

4 messages between Feb 12, 2008 and Feb 12, 2008.

replies: 3people: 3as markdown or json

Frans Pop· Feb 12, 2008, 19:23 UTC · lore
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· Feb 12, 2008, 19:50 UTC · re: Frans Pop · lore

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

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
Frans Pop· Feb 12, 2008, 21:10 UTC · re: Johannes Schindelin · lore

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

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

Show 9 quoted lines
> [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>
Alex Riesen· Feb 12, 2008, 20:06 UTC · re: Frans Pop · lore

[PATCH] Fix shell quoting in git-bisect

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
Frans Pop, Tue, Feb 12, 2008 20:23:28 +0100:
Show 9 quoted lines
> 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

← back to recent threads