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

Re: Possible bug regarding trailers

From
LALinus 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.

Previous: Christian CouderNext: Jeff King
Message 7 of 11 in “Possible bug regarding trailers”
  1. eric.frederich@siemens.comJun 15, 2023
  2. Kristoffer HaugsbakkJun 15, 2023
  3. Jeff KingJun 16, 2023
  4. Christian CouderJun 16, 2023
  5. commit: pass --no-divider to interpret-trailersJeff King, Jun 17, 2023
  6. Christian CouderJun 19, 2023
  7. Linus ArverJun 16, 2023
  8. Jeff KingJun 17, 2023
  9. eric.frederich@siemens.comJun 16, 2023
  10. Christian CouderJun 16, 2023
  11. Linus ArverJun 16, 2023

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.