From: Junio C Hamano <junio@pobox.com>
To: Christian Couder <chriscool@tuxfamily.org>
Cc: Ingo Molnar <mingo@elte.hu>, git@vger.kernel.org
Subject: Re: [PATCH 2/2] bisect: warn if given dubious tag or branch as rev
Date: Mon, 14 Apr 2008 16:33:36 -0700 [thread overview]
Message-ID: <7vabjw810v.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080414054151.52e55e7f.chriscool@tuxfamily.org> (Christian Couder's message of "Mon, 14 Apr 2008 05:41:51 +0200")
Christian Couder <chriscool@tuxfamily.org> writes:
> This patch refactors rev parsing code in a new "bisect_parse_rev"
> function, and adds warnings in case a rev with a name that is the
> same as one of the bisect subcommands is given where a revision
> is expected.
>
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> ---
> git-bisect.sh | 47 ++++++++++++++++++++++++++++++------------
> t/t6030-bisect-porcelain.sh | 21 +++++++++++++++++++
> 2 files changed, 54 insertions(+), 14 deletions(-)
>
> diff --git a/git-bisect.sh b/git-bisect.sh
> index 6b43461..a090b97 100755
> --- a/git-bisect.sh
> +++ b/git-bisect.sh
> @@ -61,6 +61,31 @@ bisect_autostart() {
> }
> }
>
> +bisect_parse_rev() {
> + rev="$1"
> + dont_die_on_wrong_rev="$2"
> + name="$rev^{commit}"
> + dubious_rev_name=''
> +
> + case "$rev" in
> + HEAD)
> + name='HEAD' ;;
> + help|start|bad|good|skip|next|reset|visualize|replay|log|run)
> + dubious_rev_name='yes' ;;
> + esac
I see you listed all the subcommand names here but I somehow doubt this is
sensible.
The "bisect good $foo bad $bar" example from Ingo's transcript may suggest
that good/bad may incorrectly appear by copying and pasting from an
incorrect how-to guide, but on the other hand "bisect bad log" to mark the
tip of the "log" branch (or "replay or any other common words) to see
where in the development trail on that branch things got broken is a
perfectly valid and plausible thing to do. Also when you happen to have
found something broken while you are working on a more important issue,
you may tentatively do "git tag bad $it", and keep working on that
important issue, only to come back later and use that lightweight tag to
feed "git bisect" with. In either use case, "you named your ref the same
as bisect subcommand name, bad boy" is an unnecessary noise.
next prev parent reply other threads:[~2008-04-14 23:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-14 3:41 [PATCH 2/2] bisect: warn if given dubious tag or branch as rev Christian Couder
2008-04-14 23:33 ` Junio C Hamano [this message]
2008-04-15 7:05 ` Christian Couder
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=7vabjw810v.fsf@gitster.siamese.dyndns.org \
--to=junio@pobox.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=mingo@elte.hu \
/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).