Miklos Vajna <vmiklos@xxxxxxx> writes: > +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. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html