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

Re: [PATCH v2 0/3] breaking-changes: deprecate support for core.commentChar=auto

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Aug 1, 2025, 10:36 UTC
Message-ID
<a9ddf6cd-28c5-4030-9e63-80df191f1397@gmail.com>
In-Reply-To
<xmqq7bznog2o.fsf@gitster.g>
On 01/08/2025 04:50, Junio C Hamano wrote:
Show 32 quoted lines
> Phillip Wood <phillip.wood123@gmail.com> writes:
> 
>> Changes since V1:
>>   - Rebased onto a merge of 'ps/config-wo-the-repository' and 'master'
> 
> OK.  I needed the following merge-fix to make this merge work.
> 
> diff --git w/environment.c c/environment.c
> index ae1427bb9e..a0ac5934b3 100644
> --- w/environment.c
> +++ c/environment.c
> @@ -461,9 +461,11 @@ static int git_default_core_config(const char *var, const char *value,
>   	    !strcmp(var, "core.commentstring")) {
>   		if (!value)
>   			return config_error_nonbool(var);
> -		else if (!strcasecmp(value, "auto"))
> +		else if (!strcasecmp(value, "auto")) {
>   			auto_comment_line_char = 1;
> -		else if (value[0]) {
> +			FREE_AND_NULL(comment_line_str_to_free);
> +			comment_line_str = "#";
> +		} else if (value[0]) {
>   			if (strchr(value, '\n'))
>   				return error(_("%s cannot contain newline"), var);
>   			comment_line_str = value;
> 
> I guess I used to carry an equivalent as a recurrent merge-fix for
> your topic branch, but rolling it into the base of the series is
> certainly safer (i.e. we have to do a merge and resolve conflicts
> just once, and after that we won't even touch it---as opposed to
> keep recreating the same conflict and resolving every time we merge
> your topic via rerere & merge-fix mechanism).

I was hoping that rebasing on master would eliminate the need for a fix as 'ac/auto-comment-char-fix' is now in master but in the meantime 'ps/config-wo-the-repository' came along and moved code from config.c to environment.c without those changes. I'd assumed you already had a similar fixup when merging 'ps/config-wo-the-repository' into seen.

Thanks
Phillip
Previous: Junio C HamanoNext: Junio C Hamano
Message 33 of 45 in “breaking-changes: deprecate support for core.commentChar=auto”
  1. 0/2 breaking-changes: deprecate support for core.commentChar=autoPhillip Wood, Jul 8, 2025
  2. 1/2 breaking-changes: deprecate support for core.commentString=autoPhillip Wood, Jul 8, 2025
  3. Ayush ChandekarJul 8, 2025
  4. Phillip WoodJul 9, 2025
  5. 2/2 commit: print advice when core.commentString=autoPhillip Wood, Jul 8, 2025
  6. Junio C HamanoJul 8, 2025
  7. Phillip WoodJul 9, 2025
  8. Junio C HamanoJul 9, 2025
  9. Phillip WoodJul 11, 2025
  10. Junio C HamanoJul 11, 2025
  11. Oswald BuddenhagenJul 12, 2025
  12. Junio C HamanoJul 12, 2025
  13. Junio C HamanoJul 26, 2025
  14. Phillip WoodJul 27, 2025
  15. Junio C HamanoJul 9, 2025
  16. Ayush ChandekarJul 9, 2025
  17. Phillip WoodJul 9, 2025
  18. 0/3 breaking-changes: deprecate support for core.commentChar=autoPhillip Wood, Jul 31, 2025
  19. 1/3 breaking-changes: deprecate support for core.commentString=autoPhillip Wood, Jul 31, 2025
  20. Junio C HamanoJul 31, 2025
  21. 2/3 config: warn on core.commentString=autoPhillip Wood, Jul 31, 2025
  22. Junio C HamanoJul 31, 2025
  23. Phillip WoodAug 1, 2025
  24. Oswald BuddenhagenAug 1, 2025
  25. 3/3 commit: print advice when core.commentString=autoPhillip Wood, Jul 31, 2025
  26. Oswald BuddenhagenAug 1, 2025
  27. Junio C HamanoAug 1, 2025
  28. Phillip WoodAug 26, 2025
  29. Oswald BuddenhagenAug 27, 2025
  30. Junio C HamanoAug 27, 2025
  31. Oswald BuddenhagenAug 27, 2025
  32. Junio C HamanoAug 1, 2025
  33. Phillip WoodAug 1, 2025
  34. Junio C HamanoAug 1, 2025
  35. 0/3 breaking-changes: deprecate support for core.commentChar=autoPhillip Wood, Aug 26, 2025
  36. 1/3 breaking-changes: deprecate support for core.commentString=autoPhillip Wood, Aug 26, 2025
  37. 3/3 commit: print advice when core.commentString=autoPhillip Wood, Aug 26, 2025
  38. 2/3 config: warn on core.commentString=autoPhillip Wood, Aug 26, 2025
  39. Junio C HamanoAug 26, 2025
  40. Phillip WoodAug 27, 2025
  41. Junio C HamanoAug 27, 2025
  42. 0/3 breaking-changes: deprecate support for core.commentChar=autoPhillip Wood, Aug 27, 2025
  43. 1/3 breaking-changes: deprecate support for core.commentString=autoPhillip Wood, Aug 27, 2025
  44. 2/3 config: warn on core.commentString=autoPhillip Wood, Aug 27, 2025
  45. 3/3 commit: print advice when core.commentString=autoPhillip Wood, Aug 27, 2025

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.