git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Couder <chriscool@tuxfamily.org>
To: Miklos Vajna <vmiklos@frugalware.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 3/5] git-bisect: use dash-less form on git bisect log
Date: Fri, 11 Jul 2008 08:39:14 +0200	[thread overview]
Message-ID: <200807110839.14764.chriscool@tuxfamily.org> (raw)
In-Reply-To: <eb505d0d8f7d2bf50073414baa799a80a9df7453.1215734605.git.vmiklos@frugalware.org>

Le vendredi 11 juillet 2008, Miklos Vajna a écrit :
> 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.

  parent reply	other threads:[~2008-07-11  6:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-11  0:12 [PATCH 0/5] Extend make remove-dashes Miklos Vajna
2008-07-11  0:12 ` [PATCH 1/5] t0001-init.sh: change confusing directory name Miklos Vajna
2008-07-11  0:12   ` [PATCH 2/5] t1007-hash-object.sh: use quotes for the test description Miklos Vajna
2008-07-11  0:12     ` [PATCH 3/5] git-bisect: use dash-less form on git bisect log Miklos Vajna
2008-07-11  0:12       ` [PATCH 4/5] make remove-dashes: apply to scripts and programs as well, not just to builtins Miklos Vajna
2008-07-11  6:39       ` Christian Couder [this message]
2008-07-11 16:01         ` [PATCH] git-bisect: use dash-less form on git bisect log Miklos Vajna
2008-07-13  6:19           ` Christian Couder
2008-07-13 21:26             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200807110839.14764.chriscool@tuxfamily.org \
    --to=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=vmiklos@frugalware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).