{"thread":{"id":"25851","subject":"[PATCH] rebase: pass --signoff option to git am","startedAt":"2010-11-27T11:15:42Z","lastAt":"2010-12-06T17:28:47Z","messageCount":8,"participants":["Giuseppe Bilotta","Sverre Rabbelier","Martin von Zweigbergk","Kevin Ballard","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"156721","messageId":"1290856542-6070-1-git-send-email-giuseppe.bilotta@gmail.com","threadId":"25851","inReplyTo":null,"subject":"[PATCH] rebase: pass --signoff option to git am","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2010-11-27T11:15:42Z","receivedAt":"2010-11-27T11:15:42Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"This allows people (like me) that forget to sign off their commits to do\na single rebase pass e.g. while preparing the patchset for submission.\n\nSigned-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n---\n Documentation/git-rebase.txt |    6 ++++++\n git-rebase.sh                |    2 +-\n 2 files changed, 7 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 30e5c0e..d513e42 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -320,6 +320,12 @@ link:howto/revert-a-faulty-merge.txt[revert-a-faulty-merge How-To] for details).\n -p::\n --preserve-merges::\n \tInstead of ignoring merges, try to recreate them.\n+\n+--signoff::\n+\tThis flag is passed to 'git am' to sign off all the rebased\n+\tcommits (see linkgit:git-am[1]).\n+\tIncompatible with the --interactive option.\n+\n +\n This uses the `--interactive` machinery internally, but combining it\n with the `--interactive` option explicitly is generally not a good\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex 0e9d52a..9de03ee 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -354,7 +354,7 @@ do\n \t--ignore-whitespace)\n \t\tgit_am_opt=\"$git_am_opt $1\"\n \t\t;;\n-\t--committer-date-is-author-date|--ignore-date)\n+\t--committer-date-is-author-date|--ignore-date|--signoff)\n \t\tgit_am_opt=\"$git_am_opt $1\"\n \t\tforce_rebase=t\n \t\t;;\n-- \n1.7.3.2.184.gecaee\n"},{"id":"156745","messageId":"alpine.DEB.1.10.1011272002090.26955@debian","threadId":"25851","inReplyTo":"AANLkTi=qAus_w18sYXP7m+jtQOGtgkNrsxgiNcbHevC7@mail.gmail.com","subject":"Re: [PATCH] rebase: pass --signoff option to git am","fromName":"Martin von Zweigbergk","fromEmail":"martin.von.zweigbergk@gmail.com","sentAt":"2010-11-27T19:05:42Z","receivedAt":"2010-11-27T19:05:42Z","isPatch":true,"sender":{"key":"martinvonz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/891642?v=4"},"body":"\nOn Sun, 28 Nov 2010, Sverre Rabbelier wrote:\n\n> Heya,\n> \n> On Sat, Nov 27, 2010 at 12:15, Giuseppe Bilotta\n> <giuseppe.bilotta@gmail.com> wrote:\n> >  -p::\n> >  --preserve-merges::\n> >        Instead of ignoring merges, try to recreate them.\n> > +\n> > +--signoff::\n> > +       This flag is passed to 'git am' to sign off all the rebased\n> > +       commits (see linkgit:git-am[1]).\n> > +       Incompatible with the --interactive option.\n> \n> The one above that does have a shorthand (-p), why should we (not?)\n> give --signoff it's customary -s shorthand here?\n\nThe '-s' flag is unfortunately already taken. It is used for\nspecifying a merge strategy.\n\n/Martin\n"},{"id":"156744","messageId":"AANLkTi=qAus_w18sYXP7m+jtQOGtgkNrsxgiNcbHevC7@mail.gmail.com","threadId":"25851","inReplyTo":"1290856542-6070-1-git-send-email-giuseppe.bilotta@gmail.com","subject":"Re: [PATCH] rebase: pass --signoff option to git am","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-11-28T00:32:54Z","receivedAt":"2010-11-28T00:32:54Z","isPatch":true,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Sat, Nov 27, 2010 at 12:15, Giuseppe Bilotta\n<giuseppe.bilotta@gmail.com> wrote:\n>  -p::\n>  --preserve-merges::\n>        Instead of ignoring merges, try to recreate them.\n> +\n> +--signoff::\n> +       This flag is passed to 'git am' to sign off all the rebased\n> +       commits (see linkgit:git-am[1]).\n> +       Incompatible with the --interactive option.\n\nThe one above that does have a shorthand (-p), why should we (not?)\ngive --signoff it's customary -s shorthand here?\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"156752","messageId":"AANLkTim+vJuZ9bJnROqbzN8O-K8NVyi8zHYokDNqOjqa@mail.gmail.com","threadId":"25851","inReplyTo":"alpine.DEB.1.10.1011272002090.26955@debian","subject":"Re: [PATCH] rebase: pass --signoff option to git am","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2010-11-28T08:00:08Z","receivedAt":"2010-11-28T08:00:08Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"On Sat, Nov 27, 2010 at 8:05 PM, Martin von Zweigbergk\n<martin.von.zweigbergk@gmail.com> wrote:\n>\n> On Sun, 28 Nov 2010, Sverre Rabbelier wrote:\n>\n>> Heya,\n>>\n>> On Sat, Nov 27, 2010 at 12:15, Giuseppe Bilotta\n>> <giuseppe.bilotta@gmail.com> wrote:\n>> >  -p::\n>> >  --preserve-merges::\n>> >        Instead of ignoring merges, try to recreate them.\n>> > +\n>> > +--signoff::\n>> > +       This flag is passed to 'git am' to sign off all the rebased\n>> > +       commits (see linkgit:git-am[1]).\n>> > +       Incompatible with the --interactive option.\n>>\n>> The one above that does have a shorthand (-p), why should we (not?)\n>> give --signoff it's customary -s shorthand here?\n>\n> The '-s' flag is unfortunately already taken. It is used for\n> specifying a merge strategy.\n\nIn fact, this is why I was a little skeptical myself about submitting\nthis patch. What if people start remembering that rebase supports\n--signoff and implicity assume that -s is also a valid shortcut? Funky\nerrors. (I've been bittem myself by similar situations for whitespace\nsupport. Can I pass -b or not? Will it mean --ignore-whitespace?)\n\n-- \nGiuseppe \"Oblomov\" Bilotta\n"},{"id":"156857","messageId":"ADC46761-DFF5-486D-B604-05BA8C8631EB@sb.org","threadId":"25851","inReplyTo":"1290856542-6070-1-git-send-email-giuseppe.bilotta@gmail.com","subject":"Re: [PATCH] rebase: pass --signoff option to git am","fromName":"Kevin Ballard","fromEmail":"kevin@sb.org","sentAt":"2010-11-29T22:57:53Z","receivedAt":"2010-11-29T22:57:53Z","isPatch":true,"sender":{"key":"kevin@sb.org","avatar":"https://avatars.githubusercontent.com/u/714?v=4"},"body":"On Nov 27, 2010, at 3:15 AM, Giuseppe Bilotta wrote:\n\n> This allows people (like me) that forget to sign off their commits to do\n> a single rebase pass e.g. while preparing the patchset for submission.\n\nYou're probably already aware, but git format-patch supports the -s/--signoff\nflags to sign off commits as they're prepared. There's even a config var\nyou can set to make this the default (format.signoff = true).\n\n-Kevin Ballard\n"},{"id":"156885","messageId":"AANLkTindvz=7OmYaL6AL_oAj50U9PLnRrbSpjgR92z7C@mail.gmail.com","threadId":"25851","inReplyTo":"ADC46761-DFF5-486D-B604-05BA8C8631EB@sb.org","subject":"Re: [PATCH] rebase: pass --signoff option to git am","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2010-11-30T08:09:42Z","receivedAt":"2010-11-30T08:09:42Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"On Mon, Nov 29, 2010 at 11:57 PM, Kevin Ballard <kevin@sb.org> wrote:\n> On Nov 27, 2010, at 3:15 AM, Giuseppe Bilotta wrote:\n>\n>> This allows people (like me) that forget to sign off their commits to do\n>> a single rebase pass e.g. while preparing the patchset for submission.\n>\n> You're probably already aware, but git format-patch supports the -s/--signoff\n> flags to sign off commits as they're prepared. There's even a config var\n> you can set to make this the default (format.signoff = true).\n\nThat works if you're sharing your patches with format-patch, but not\nfor example when asking for a pull. Maybe I should extend the commit\nmessage to include this case.\n\n-- \nGiuseppe \"Oblomov\" Bilotta\n"},{"id":"157398","messageId":"AANLkTinnn_QnBJ8AZT9ZB+ZHVRDZV0tDret=YQeyfa01@mail.gmail.com","threadId":"25851","inReplyTo":"AANLkTindvz=7OmYaL6AL_oAj50U9PLnRrbSpjgR92z7C@mail.gmail.com","subject":"Re: [PATCH] rebase: pass --signoff option to git am","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2010-12-06T10:41:35Z","receivedAt":"2010-12-06T10:41:35Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"On Tue, Nov 30, 2010 at 9:09 AM, Giuseppe Bilotta\n<giuseppe.bilotta@gmail.com> wrote:\n> On Mon, Nov 29, 2010 at 11:57 PM, Kevin Ballard <kevin@sb.org> wrote:\n>> On Nov 27, 2010, at 3:15 AM, Giuseppe Bilotta wrote:\n>>\n>>> This allows people (like me) that forget to sign off their commits to do\n>>> a single rebase pass e.g. while preparing the patchset for submission.\n>>\n>> You're probably already aware, but git format-patch supports the -s/--signoff\n>> flags to sign off commits as they're prepared. There's even a config var\n>> you can set to make this the default (format.signoff = true).\n>\n> That works if you're sharing your patches with format-patch, but not\n> for example when asking for a pull. Maybe I should extend the commit\n> message to include this case.\n\nFor what it's worth, somebody on #git just asked how to signoff a\nbunch of patches. The answer was to rebase -i and sign off each one of\nthem. This is exactly the kind of usage that my patch would simplify.\nAny chance of it getting merged?\n\n-- \nGiuseppe \"Oblomov\" Bilotta\n"},{"id":"157408","messageId":"20101206172847.GA6272@burratino","threadId":"25851","inReplyTo":"AANLkTinnn_QnBJ8AZT9ZB+ZHVRDZV0tDret=YQeyfa01@mail.gmail.com","subject":"Re: [PATCH] rebase: pass --signoff option to git am","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-12-06T17:28:47Z","receivedAt":"2010-12-06T17:28:47Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Giuseppe Bilotta wrote:\n\n> For what it's worth, somebody on #git just asked how to signoff a\n> bunch of patches. The answer was to rebase -i and sign off each one of\n> them.\n\nHow I would do it in existing git:\n\n\tgit branch oldhead\n\tgit reset --keep base\n\tgit log --oneline --graph HEAD..oldhead;\t# the right patches?\n\tgit cherry-pick -s HEAD..oldhead\n\tgit diff oldhead\n\nOr without multiple-cherry-pick, maybe:\n\n\tgit branch oldhead\n\tgit reset --keep base\n\tgit format-patch -k --stdout HEAD..oldhead >series\n\tgit am -s -3 -i series;\t# the right patches?\n\tgit diff oldhead\n\nNo opinion on the automatic-signoff-in-rebase here.\n"}]}