From: Junio C Hamano <gitster@pobox.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: git@vger.kernel.org
Subject: Re: git-bisect feature suggestion: "git-bisect diff"
Date: Fri, 07 Dec 2007 02:25:34 -0800 [thread overview]
Message-ID: <7vwsrq3iox.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7v63za4yic.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Fri, 07 Dec 2007 01:58:35 -0800")
Junio C Hamano <gitster@pobox.com> writes:
> Ingo Molnar <mingo@elte.hu> writes:
>
>> would be nice to have:
>>
>> git-bisect diff
>>
>> that enables one to have a look at the currently open bisection window,
>> in git-log -p format. This would often be much faster to analyze than
>> looking at git-bisect visualize. (and it could also be used in non-GUI
>> workflows)
>
> Hmm. It is very unfortunate that "bisect log" is taken for something
> unrelated, so tentatively let's call it lumber.
>
> $ git bisect lumber [-p] [--stat]
>
> would give you the short-hand, hopefully.
More seriously...
-- >8 --
git-bisect visualize: work in non-windowed environments better
This teaches "git bisect visualize" to be more useful in non-windowed
environments.
(1) When no option is given, and $DISPLAY is set, it continues to
spawn gitk as before;
(2) When no option is given, and $DISPLAY is unset, "git log" is run
to show the range of commits between the bad one and the good ones;
(3) If only "-flag" options are given, "git log <options>" is run.
E.g. "git bisect visualize --stat"
(4) Otherwise, all of the given options are taken as the initial part
of the command line and the commit range expression is given to
that command. E.g. "git bisect visualize tig" will run "tig"
history viewer to show between the bad one and the good ones.
As "visualize" is a bit too long to type, we also give it a shorter
synonym "view".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
git-bisect.sh | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/git-bisect.sh b/git-bisect.sh
index 7a6521e..bb6fe84 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -324,8 +324,23 @@ bisect_next() {
bisect_visualize() {
bisect_next_check fail
+
+ if test $# = 0
+ then
+ case "${DISPLAY+set}" in
+ '') set git log ;;
+ set) set gitk ;;
+ esac
+ else
+ case "$1" in
+ git*|tig) ;;
+ -*) set git log "$@" ;;
+ *) set git "$@" ;;
+ esac
+ fi
+
not=$(git for-each-ref --format='%(refname)' "refs/bisect/good-*")
- eval gitk refs/bisect/bad --not $not -- $(cat "$GIT_DIR/BISECT_NAMES")
+ eval '"$@"' refs/bisect/bad --not $not -- $(cat "$GIT_DIR/BISECT_NAMES")
}
bisect_reset() {
@@ -449,7 +464,7 @@ case "$#" in
next)
# Not sure we want "next" at the UI level anymore.
bisect_next "$@" ;;
- visualize)
+ visualize|view)
bisect_visualize "$@" ;;
reset)
bisect_reset "$@" ;;
next prev parent reply other threads:[~2007-12-07 10:26 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-07 9:34 git-bisect feature suggestion: "git-bisect diff" Ingo Molnar
2007-12-07 9:58 ` Junio C Hamano
2007-12-07 10:25 ` Junio C Hamano [this message]
2007-12-07 11:21 ` Ingo Molnar
2007-12-07 19:28 ` Junio C Hamano
2007-12-07 19:46 ` Ingo Molnar
2007-12-07 21:34 ` Jeff King
2007-12-07 21:35 ` Jeff King
2007-12-07 21:44 ` Junio C Hamano
2007-12-07 21:55 ` Jeff King
2007-12-07 22:03 ` Junio C Hamano
2007-12-07 22:07 ` Jeff King
2007-12-08 2:54 ` Junio C Hamano
2007-12-08 5:36 ` Christian Couder
2007-12-08 15:29 ` Ingo Molnar
2007-12-09 5:33 ` git-bisect run make -j64 kernel/ (was Re: git-bisect feature suggestion: "git-bisect diff") Christian Couder
2007-12-12 9:43 ` Ingo Molnar
2007-12-11 9:24 ` git-bisect feature suggestion: "git-bisect diff" Ingo Molnar
2007-12-11 9:29 ` Pierre Habouzit
2007-12-11 10:13 ` Jakub Narebski
2007-12-11 11:59 ` Pierre Habouzit
2007-12-11 12:25 ` Jeff King
2007-12-11 12:33 ` Jeff King
2007-12-11 14:05 ` Ingo Molnar
2007-12-11 14:43 ` [PATCH] Invert numbers and names in the git-shortlog summary mode Pierre Habouzit
2007-12-11 14:57 ` Ingo Molnar
2007-12-11 15:24 ` Pierre Habouzit
2007-12-11 15:34 ` Nicolas Pitre
2007-12-11 18:09 ` Junio C Hamano
2007-12-11 15:48 ` Ingo Molnar
2007-12-11 16:07 ` Pierre Habouzit
2007-12-11 16:11 ` Pierre Habouzit
2007-12-11 21:13 ` Ingo Molnar
2007-12-11 22:21 ` Junio C Hamano
2007-12-11 17:58 ` Junio C Hamano
2007-12-11 10:17 ` git-bisect feature suggestion: "git-bisect diff" Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2007-12-11 22:22 しらいしななこ
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=7vwsrq3iox.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--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).