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

Re: [PATCH v2] cherry-pick: don't forget -s on failure

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 13, 2012, 17:23 UTC
Message-ID
<7v8vcdalby.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120913073324.GA14383@suse.cz>
Miklos Vajna <vmiklos@suse.cz> writes:
Show 18 quoted lines
> +void append_signoff(struct strbuf *msgbuf, int ignore_footer)
> +{
> +	struct strbuf sob = STRBUF_INIT;
> +	int i;
> +
> +	strbuf_addstr(&sob, sign_off_header);
> +	strbuf_addstr(&sob, fmt_name(getenv("GIT_COMMITTER_NAME"),
> +				getenv("GIT_COMMITTER_EMAIL")));
> +	strbuf_addch(&sob, '\n');
> +	for (i = msgbuf->len - 1 - ignore_footer; i > 0 && msgbuf->buf[i - 1] != '\n'; i--)
> +		; /* do nothing */
> +	if (prefixcmp(msgbuf->buf + i, sob.buf)) {
> +		if (!i || !ends_rfc2822_footer(msgbuf))
> +			strbuf_addch(msgbuf, '\n');
> +		strbuf_addbuf(msgbuf, &sob);
> +	}
> +	strbuf_release(&sob);
> +}

Hrm, what is this thing trying to do? It does start scanning from the end (ignoring the "Conflicts:" thing) to see who the last person that signed it off was, but once it decides that it needs to add a new sign-off, it still adds it at the very end anyway.

Previous: Junio C HamanoNext: Miklos Vajna
Message 6 of 9 in “cherry-pick: don't forget -s on failure”
  1. cherry-pick: don't forget -s on failureMiklos Vajna, Sep 12, 2012
  2. Junio C HamanoSep 12, 2012
  3. Junio C HamanoSep 12, 2012
  4. cherry-pick: don't forget -s on failureMiklos Vajna, Sep 13, 2012
  5. Junio C HamanoSep 13, 2012
  6. Junio C HamanoSep 13, 2012
  7. cherry-pick: don't forget -s on failureMiklos Vajna, Sep 13, 2012
  8. Junio C HamanoSep 13, 2012
  9. cherry-pick: don't forget -s on failureMiklos Vajna, Sep 14, 2012

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.