git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] bisect: improve output when bad commit is found

From
TSTrevor Saunders <tbsaunde@tbsaunde.org>
Date
May 11, 2015, 23:11 UTC
Message-ID
<20150511231125.GC18112@tsaunders-iceball.corp.tor1.mozilla.com>
In-Reply-To
<xmqq4mni3jjg.fsf@gitster.dls.corp.google.com>
On Mon, May 11, 2015 at 02:12:51PM -0700, Junio C Hamano wrote:
Show 6 quoted lines
> Trevor Saunders <tbsaunde@tbsaunde.org> writes:
> > 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?
oops, forgot
> > -		printf("%s is the first bad commit\n", bisect_rev_hex);
> > +		puts("the first bad commit is");
> 
> s/the/The/, I would think.
yup
Show 16 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.

yeah, I did it that way to be consistant with the near by function add_lineinto_file, but I can change if that's prefered.

Show 6 quoted lines
> > +	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?

Its not great, but the test seems to log multiple invokations of git bisect into the same file, so there may be text about previous runs before we are told which commit is bad.

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 5 in “bisect: improve output when bad commit is found”
  1. bisect: improve output when bad commit is foundTrevor Saunders, May 11, 2015
  2. Junio C HamanoMay 11, 2015
  3. Trevor SaundersMay 11, 2015
  4. Junio C HamanoMay 12, 2015
  5. Trevor SaundersMay 12, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.