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

Re: [PATCH v2] format-patch: make output filename configurable

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 10, 2020, 01:43 UTC
Message-ID
<xmqqzh3q7zqu.fsf@gitster.c.googlers.com>
In-Reply-To
<20201110002312.GA1267848@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 22 quoted lines
> On Mon, Nov 09, 2020 at 11:23:48AM -0800, Junio C Hamano wrote:
>
>> @@ -1822,6 +1825,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
>>  	init_display_notes(&notes_opt);
>>  	git_config(git_format_config, NULL);
>>  	repo_init_revisions(the_repository, &rev, prefix);
>> +	rev.subject_prefix = fmt_patch_subject_prefix;
>>  	rev.show_notes = show_notes;
>>  	memcpy(&rev.notes_opt, &notes_opt, sizeof(notes_opt));
>>  	rev.commit_format = CMIT_FMT_EMAIL;
>> @@ -1831,7 +1835,6 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
>>  	rev.diff = 1;
>>  	rev.max_parents = 1;
>>  	rev.diffopt.flags.recursive = 1;
>> -	rev.subject_prefix = fmt_patch_subject_prefix;
>>  	memset(&s_r_opt, 0, sizeof(s_r_opt));
>>  	s_r_opt.def = "HEAD";
>>  	s_r_opt.revarg_opt = REVARG_COMMITTISH;
>
> It's not clear to me what these hunks are doing. I'm trying really hard
> to find some subtle reason that we need to init this field sooner, but I
> can't. It really looks like it might be leftover noise.

It indeed was leftover noise and has nothing to do with the output filename length configurablility (I suspect it is a true no-op).

Thanks.
Previous: Jeff KingNext: hukeping
Message 11 of 15 in “Lengthening FORMAT_PATCH_NAME_MAX to 80”
  1. Lengthening FORMAT_PATCH_NAME_MAX to 80Hu Keping, Nov 5, 2020
  2. Jeff KingNov 5, 2020
  3. Junio C HamanoNov 5, 2020
  4. hukepingNov 6, 2020
  5. Junio C HamanoNov 6, 2020
  6. Junio C HamanoNov 6, 2020
  7. format-patch: make output filename configurableJunio C Hamano, Nov 6, 2020
  8. Eric SunshineNov 6, 2020
  9. format-patch: make output filename configurableJunio C Hamano, Nov 9, 2020
  10. Jeff KingNov 10, 2020
  11. Junio C HamanoNov 10, 2020
  12. hukepingNov 10, 2020
  13. Junio C HamanoNov 10, 2020
  14. hukepingNov 10, 2020
  15. Junio C HamanoNov 10, 2020

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.