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

Re: [PATCH 3/5] git-bisect: use dash-less form on git bisect log

From
Christian Couder <chriscool@tuxfamily.org>
Date
Jul 11, 2008, 06:39 UTC
Message-ID
<200807110839.14764.chriscool@tuxfamily.org>
In-Reply-To
<eb505d0d8f7d2bf50073414baa799a80a9df7453.1215734605.git.vmiklos@frugalware.org>
Le vendredi 11 juillet 2008, Miklos Vajna a écrit :
Show 42 quoted lines
> Given that users are supposed to type 'git bisect' now, make the output
> of 'git bisect log' consistent with this.
>
> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
> ---
>  git-bisect.sh |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/git-bisect.sh b/git-bisect.sh
> index 991b2ef..f4852a9 100755
> --- a/git-bisect.sh
> +++ b/git-bisect.sh
> @@ -149,7 +149,7 @@ bisect_start() {
>  	echo "$start_head" >"$GIT_DIR/BISECT_START" &&
>  	sq "$@" >"$GIT_DIR/BISECT_NAMES" &&
>  	eval "$eval" &&
> -	echo "git-bisect start$orig_args" >>"$GIT_DIR/BISECT_LOG" || exit
> +	echo "git bisect start$orig_args" >>"$GIT_DIR/BISECT_LOG" || exit
>  	#
>  	# Check if we can proceed to the next bisect state.
>  	#
> @@ -169,7 +169,7 @@ bisect_write() {
>  	esac
>  	git update-ref "refs/bisect/$tag" "$rev" || exit
>  	echo "# $state: $(git show-branch $rev)" >>"$GIT_DIR/BISECT_LOG"
> -	test -n "$nolog" || echo "git-bisect $state $rev"
> >>"$GIT_DIR/BISECT_LOG" +	test -n "$nolog" || echo "git bisect $state
> $rev" >>"$GIT_DIR/BISECT_LOG" }
>
>  bisect_state() {
> @@ -426,9 +426,9 @@ bisect_clean_state() {
>  bisect_replay () {
>  	test -r "$1" || die "cannot read $1 for replaying"
>  	bisect_reset
> -	while read bisect command rev
> +	while read git bisect command rev
>  	do
> -		test "$bisect" = "git-bisect" || continue
> +		test "$git $bisect" = "git bisect" || continue
>  		case "$command" in
>  		start)
>  			cmd="bisect_start $rev"
Wouldn't it be better if bisect_replay could read old logs?
Maybe with something like:
+	while read git bisect command rev
 	do
-		test "$bisect" = "git-bisect" || continue
+		test "$git $bisect" = "git bisect" -o "$git" = "git-bisect" || continue
+		if test "$git" = "git-bisect"; then
+			rev="$command"
+			command="$bisect"
+		fi
 		case "$command" in
 		start)
 			cmd="bisect_start $rev"

Thanks, Christian.

Previous: Miklos VajnaNext: Miklos Vajna
Message 6 of 9 in “Extend make remove-dashes”
  1. 0/5 Extend make remove-dashesMiklos Vajna, Jul 11, 2008
  2. 1/5 t0001-init.sh: change confusing directory nameMiklos Vajna, Jul 11, 2008
  3. 2/5 t1007-hash-object.sh: use quotes for the test descriptionMiklos Vajna, Jul 11, 2008
  4. 3/5 git-bisect: use dash-less form on git bisect logMiklos Vajna, Jul 11, 2008
  5. 4/5 make remove-dashes: apply to scripts and programs as well, not just to builtinsMiklos Vajna, Jul 11, 2008
  6. Christian CouderJul 11, 2008
  7. git-bisect: use dash-less form on git bisect logMiklos Vajna, Jul 11, 2008
  8. Christian CouderJul 13, 2008
  9. Junio C HamanoJul 13, 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.