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

Re: [PATCH v10 09/14] git-clean: use a git-add-interactive compatible UI

From
Junio C Hamano <gitster@pobox.com>
Date
May 16, 2013, 19:39 UTC
Message-ID
<7vtxm24su4.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vy5be4tbf.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 9 quoted lines
> Also please fix this one:
>
>> +		for_each_string_list_item(item, (struct string_list *)stuff->stuff) {
>> +			if ((*chosen)[i] < 0)
>> +				(*chosen)[i] = 0;
>> +			strbuf_addf(&menu, "%s%2d: %s", (*chosen)[i] ? "*" : " ", ++i, item->string);
>
> Because the evaluation order of function arguments are not defined
> (not left to right; these are comma-expressions),

I cannot spell, sorry. s/are not defined/is not defined/. Also s/these are c/these are not c/;

Show 9 quoted lines
>
> 	(*chosen)[i] ? "*" : " "
>
> may use the original value of "i", or value after increment the
> evaluation of
>
> 	++i
>
> left in "i".
Previous: Junio C HamanoNext: Jiang Xin
Message 13 of 18 in “interactive git-clean”
  1. 00/14 interactive git-cleanJiang Xin, May 16, 2013
  2. 01/14 path.c: refactor relative_path(), not only strip prefixJiang Xin, May 16, 2013
  3. 02/14 quote.c: remove path_relative, use relative_path insteadJiang Xin, May 16, 2013
  4. 03/14 Refactor quote_path_relative, remove unused paramsJiang Xin, May 16, 2013
  5. 04/14 Refactor write_name_quoted_relative, remove unused paramsJiang Xin, May 16, 2013
  6. Junio C HamanoMay 16, 2013
  7. 05/14 git-clean: refactor git-clean into two phasesJiang Xin, May 16, 2013
  8. 06/14 git-clean: add support for -i/--interactiveJiang Xin, May 16, 2013
  9. 07/14 git-clean: show items of del_list in columnsJiang Xin, May 16, 2013
  10. 08/14 git-clean: add colors to interactive git-cleanJiang Xin, May 16, 2013
  11. 09/14 git-clean: use a git-add-interactive compatible UIJiang Xin, May 16, 2013
  12. Junio C HamanoMay 16, 2013
  13. Junio C HamanoMay 16, 2013
  14. 10/14 git-clean: add filter by pattern interactive actionJiang Xin, May 16, 2013
  15. 11/14 git-clean: add select by numbers interactive actionJiang Xin, May 16, 2013
  16. 12/14 git-clean: add ask each interactive actionJiang Xin, May 16, 2013
  17. 13/14 git-clean: add documentation for interactive git-cleanJiang Xin, May 16, 2013
  18. 14/14 test: add t7301 for git-clean--interactiveJiang Xin, May 16, 2013

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.