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

Re: [PATCH v2 1/2] bisect: output state before we are ready to compute bisection

From
Junio C Hamano <gitster@pobox.com>
Date
May 6, 2022, 16:42 UTC
Message-ID
<xmqqmtfuobno.fsf@gitster.g>
In-Reply-To
<YnSNWMBRZA0S8X26@nand.local>
Taylor Blau <me@ttaylorr.com> writes:
Show 11 quoted lines
>> +	if (!bs.nr_good && !bs.nr_bad)
>> +		printf(_("status: waiting for both good and bad commits\n"));
>> +	else if (bs.nr_good)
>> +		printf(Q_("status: waiting for bad commit, %d good commit known\n",
>> +			  "status: waiting for bad commit, %d good commits known\n",
>> +			  bs.nr_good), bs.nr_good);
>> +	else
>> +		printf(_("status: waiting for good commit(s), bad commit known\n"));
>> +}
>
> Could or should these printf()'s be advise() calls instead?

Given that existing bisect_next_all() mesasge to give estimates come to the standard output, I do not think so.

	/*
	 * TRANSLATORS: the last %s will be replaced with "(roughly %d
	 * steps)" translation.
	 */
	printf(Q_("Bisecting: %d revision left to test after this %s\n",
		  "Bisecting: %d revisions left to test after this %s\n",
		  nr), nr, steps_msg);

I view these new messages as merely correcting the gap we used to have. We should have been giving feedback to the end-user when they did something, but instead we were giving feedback only when we did something, which resulted in the original "Huh?" that motivated this series.

I actually wonder if we should do s/status:/Bisecting:/ to make the messages even more uniform, but if we were to go in that direction in the longer term, we'd probably be downcasing "Bisecting" to match our error/warning/info messages.

Thanks.
Previous: Chris DownNext: Junio C Hamano
Message 5 of 19 in “bisect: status improvements when bisect is not fully fleshed out”
  1. 0/2 bisect: status improvements when bisect is not fully fleshed outChris Down, May 6, 2022
  2. 1/2 bisect: output state before we are ready to compute bisectionChris Down, May 6, 2022
  3. Taylor BlauMay 6, 2022
  4. Chris DownMay 6, 2022
  5. Junio C HamanoMay 6, 2022
  6. Junio C HamanoMay 6, 2022
  7. 2/2 bisect: output bisect setup status in bisect logChris Down, May 6, 2022
  8. Taylor BlauMay 6, 2022
  9. Chris DownMay 6, 2022
  10. Taylor BlauMay 9, 2022
  11. Junio C HamanoMay 6, 2022
  12. Junio C HamanoMay 6, 2022
  13. Junio C HamanoMay 6, 2022
  14. Taylor BlauMay 9, 2022
  15. Junio C HamanoMay 9, 2022
  16. Taylor BlauMay 9, 2022
  17. Chris DownMay 7, 2022
  18. Junio C HamanoMay 7, 2022
  19. Chris DownMay 7, 2022

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.