Thread (11 messages) 11 messages, 5 authors, 2023-06-19

Re: Possible bug regarding trailers

From: Linus Arver <hidden>
Date: 2023-06-16 22:28:58

Hello Peff,

Jeff King [off-list ref] writes:
So I think the only bug is that "commit --trailer" should not respect
the divider. And the fix presumably:
quoted hunk ↗ jump to hunk
diff --git a/builtin/commit.c b/builtin/commit.c
index e67c4be221..9f4448f6b9 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1043,7 +1043,8 @@ static int prepare_to_commit(const char  
*index_file, const char *prefix,
  		struct child_process run_trailer = CHILD_PROCESS_INIT;
  		strvec_pushl(&run_trailer.args, "interpret-trailers",
-			     "--in-place", git_path_commit_editmsg(), NULL);
+			     "--in-place", "--no-divider",
+			     git_path_commit_editmsg(), NULL);
  		strvec_pushv(&run_trailer.args, trailer_args.v);
  		run_trailer.git_cmd = 1;
  		if (run_command(&run_trailer))
I cannot think of a reason we wouldn't want to do that (though obviously
it would need a test to become a patch).
I would like to work on this patch. I should be able to push something
up in a couple weeks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help