Re: Possible bug regarding trailers
- From
- Linus Arver <linusa@google.com>
- Date
- Jun 16, 2023, 22:28 UTC
- Message-ID
- <owlyzg4z59ei.fsf@fine.c.googlers.com>
- In-Reply-To
- <20230616042407.GA54009@coredump.intra.peff.net>
Hello Peff,
Jeff King <peff@peff.net> writes:
> So I think the only bug is that "commit --trailer" should not respect > the divider. And the fix presumably:
Show 7 quoted lines
> 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;
Show 7 quoted lines
> 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.