From: Christian Couder <chriscool@tuxfamily.org>
To: "Santi Béjar" <sbejar@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH] git-what: explain what to do next
Date: Thu, 29 May 2008 06:39:38 +0200 [thread overview]
Message-ID: <200805290639.38134.chriscool@tuxfamily.org> (raw)
In-Reply-To: <1211877299-27255-1-git-send-email-sbejar@gmail.com>
Le mardi 27 mai 2008, Santi Béjar a écrit :
> In case you don't know the next step, if it is "git commit",
> "git commit --amend", "git rebase --continue" or something else.
[...]
> diff --git a/git-bisect.sh b/git-bisect.sh
> index 4bcbace..27d3946 100755
> --- a/git-bisect.sh
> +++ b/git-bisect.sh
> @@ -1,6 +1,6 @@
> #!/bin/sh
>
> -USAGE='[help|start|bad|good|skip|next|reset|visualize|replay|log|run]'
> +USAGE='[help|start|bad|good|skip|next|reset|visualize|replay|log|run|wha
>t]' LONG_USAGE='git bisect help
> print this long help message.
> git bisect start [<bad> [<good>...]] [--] [<pathspec>...]
> @@ -23,6 +23,8 @@ git bisect log
> show bisect log.
> git bisect run <cmd>...
> use <cmd>... to automatically bisect.
> +git bisect what...
> + explain what to do if in the midle of a bisect.
Perhaps it's better to add something like this first:
git bisect status
show the current bisect state
It could tell if we are currently bisecting and show the "good", "bad"
and "skip"ped revs and the content of the BISECT_START and BISECT_NAMES
(and perhaps BISECT_RUN) files.
> Please use "git help bisect" to get the full man page.'
>
> @@ -206,6 +208,14 @@ bisect_next_check() {
> test -n "$(git for-each-ref "refs/bisect/good-*")" || missing_good=t
>
> case "$missing_good,$missing_bad,$1" in
> + ,,what)
> + # have both good and bad - ok
> + echo "Test the commit and mark it as"
> + echo "bad) $ git bisect bad"
> + echo "good) $ git bisect good"
> + echo "skip) $ git bisect skip"
> + exit
> + ;;
> ,,*)
>
> : have both good and bad - ok
>
> ;;
> @@ -213,6 +223,16 @@ bisect_next_check() {
> # do not have both but not asked to fail - just report.
> false
> ;;
> + ,t,what)
> + # have good but not bad.
> + echo "No bad commit, mark one with \"git bisect bad <rev>"\"
> + exit
> + ;;
> + t,,what)
> + # have bad but not good.
> + echo "No good commit, mark one with \"git bisect good <rev>\""
> + exit
> + ;;
> t,,good)
> # have bad but not good. we could bisect although
> # this is less optimum.
> @@ -224,6 +244,14 @@ bisect_next_check() {
> fi
>
> : bisect without good...
>
> ;;
> + t,t,what)
> + # TODO: Reuse the text in the next case
> + echo 'You need to give me at least one good' \
> + 'and one bad revisions.'
> + echo '(You can use "git bisect bad" and' \
> + '"git bisect good" for that.)'
> + exit
> + ;;
> *)
> THEN=''
> test -f "$GIT_DIR/BISECT_NAMES" || {
> @@ -497,6 +525,11 @@ bisect_run () {
> done
> }
>
> +bisect_what () {
> + test -s "$GIT_DIR/BISECT_START" || return 1
It seems not very friendly to just "return 1" when not bisecting.
And before my last patch to use BISECT_START to check if we are bisecting,
it would perhaps have been better to use 'test -f "$GIT_DIR/BISECT_NAMES"'.
Thanks,
Christian.
next prev parent reply other threads:[~2008-05-29 4:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-27 8:34 [RFC/PATCH] git-what: explain what to do next Santi Béjar
2008-05-27 10:53 ` Johannes Schindelin
2008-05-27 12:58 ` Santi Béjar
2008-05-27 13:12 ` Johannes Schindelin
2008-05-27 13:37 ` Santi Béjar
2008-05-27 13:52 ` Stephen R. van den Berg
2008-05-27 14:21 ` Santi Béjar
2008-05-27 18:08 ` Steven Walter
2008-05-27 20:24 ` Junio C Hamano
2008-05-27 20:51 ` Junio C Hamano
2008-05-28 9:12 ` Santi Béjar
2008-05-29 4:39 ` Christian Couder [this message]
2008-05-29 5:09 ` Junio C Hamano
2008-05-29 14:56 ` Jon Loeliger
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=200805290639.38134.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=sbejar@gmail.com \
/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).