git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Joel Becker <Joel.Becker@oracle.com>
Cc: git@vger.kernel.org
Subject: Re: wherefore art thou, git-applymbox? - Adding non-self signoffs
Date: Thu, 03 Jan 2008 19:32:17 -0800	[thread overview]
Message-ID: <7vr6gymfjy.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080104015028.GC3989@mail.oracle.com> (Joel Becker's message of "Thu, 3 Jan 2008 17:50:28 -0800")

Joel Becker <Joel.Becker@oracle.com> writes:

> We used to do this very easily with git-applymbox:
> (from http://oss.oracle.com/osswiki/GitRepositories/ForMaintainers)
>
> $ echo "Julie Hacker <julieh@my.site.com>" > /tmp/signoff
> $ git branch to-push master
> $ git checkout to-push
> $ git format-patch -C -k --stdout master..workingbranch > /tmp/changes-to-push
> $ git applymbox -k /tmp/changes-to-push /tmp/signoff
> $ git push ssh://my.server.com/path/project.git to-push:master
>
> 	The <signoff> file argument to applymbox allowed us to add the
> approvers signoff to an entire series in one go.  git-am does not have
> this feature.  As far as I can tell, I have to edit each patch by hand
> to add the new signoff.  Is there a better way?

Heh, applymbox's removal is an ancient news.  May 20 2007?

My reading of an old copy of git-applypatch seems to suggest
that the above example you quoted is probably wrong anyway;
shouldn't the first one be like this instead?

 $ echo "Signed-off-by: Julie Hacker <julieh@my.site.com>" >/tmp/signoff

It was actually a bug that applymbox allowed only a single
e-mail address to be added without doing any sanity checking of
the address with the author nor committer information.

If it were designed to allow adding sign-offs from other people,
the command would have allowed more than one lines in the file.
It did not.  It was not designed for that purpose.

It was designed to allow one's own sign-off; it should have
verified that it matched the committer identity.  It did not.
That was not strictly a bug for people who used the mechanism to
sign their own patches anyway, but not checking meant a misuse
like yours went unnoticed.  Not quite ideal.

I guess you can run filter-branch to munge the commit messages
after you run the

	git format-patch ... | git am

pipeline to build the to-push branch.

I do not mind a patch to enhance "git am", but not before 1.5.4.
Most likely the change would take a form of an extra parameter
that names a script (or command) that gets the commit log
message as its argument and edits it in any way it wants (in
your case you would add the S-o-b: lines in that script).

      reply	other threads:[~2008-01-04  3:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-04  1:50 wherefore art thou, git-applymbox? - Adding non-self signoffs Joel Becker
2008-01-04  3:32 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vr6gymfjy.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Joel.Becker@oracle.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).