Re: [PATCH] bisect: improve output when bad commit is found
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 11, 2015, 21:12 UTC
- Message-ID
- <xmqq4mni3jjg.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1431377939-13887-1-git-send-email-tbsaunde@tbsaunde.org>
Trevor Saunders <tbsaunde@tbsaunde.org> writes:
> When the first bad commit has been found git bisect prints something > like this
Show 8 quoted lines
> > <40 char sha1> is the first bad commit > Commit <40 char sha1> > ... > > <raw diff output> > > The raw diff output is not really useful, and its kind of silly to print
End "something like this" with a colon, and indent the example display, i.e.
... prints something like this:
<40-hex object name> is the first bad commit
Commit <40-hex object name>The raw diff output is ...
Show 5 quoted lines
> the sha1 twice. Instead lets print something like > > the first bad commit is > Commit <sha1> > ...
Likewise.
> This also fixes an odd inconsistancy where if the first bad commit is a > trivial merge git bisect will only print the first line. > ---
Sign-off?
> - printf("%s is the first bad commit\n", bisect_rev_hex);
> + puts("the first bad commit is");s/the/The/, I would think.
Show 10 quoted lines
> diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
> index 06b4868..bf50d20 100755
> --- a/t/t6030-bisect-porcelain.sh
> +++ b/t/t6030-bisect-porcelain.sh
> @@ -26,6 +26,14 @@ add_line_into_file()
> git commit --quiet -m "$MSG" $_file
> }
>
> +check_bisect_msg()
> +{Find this paragraph in Documentation/CodingGuidelines:
- We prefer a space between the function name and the parentheses,
and no space inside the parentheses. The opening "{" should also
be on the same line.> + file=$1 > + hash=$2 > + grep "the first bad commit is" $file || return $? > + grep $hash $file || return $?
Is it OK to have these strings anywhere in the $file?
Thanks.