Thread (1 message) 1 message, 1 author, 2020-11-10

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

From: Junio C Hamano <hidden>
Date: 2020-11-10 01:43:48

Jeff King [off-list ref] writes:
On Mon, Nov 09, 2020 at 11:23:48AM -0800, Junio C Hamano wrote:
quoted
@@ -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.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help