{"thread":{"id":"44928","subject":"[PATCH] rebase: pass --signoff option to git am","startedAt":"2017-01-21T10:49:17Z","lastAt":"2017-01-26T18:54:56Z","messageCount":8,"participants":["Giuseppe Bilotta","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"309884","messageId":"20170121104904.15132-1-giuseppe.bilotta@gmail.com","threadId":"44928","inReplyTo":null,"subject":"[PATCH] rebase: pass --signoff option to git am","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2017-01-21T10:49:04Z","receivedAt":"2017-01-21T10:49:17Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n---\n Documentation/git-rebase.txt | 5 +++++\n git-rebase.sh                | 3 ++-\n 2 files changed, 7 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 67d48e6883..e6f0b93337 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -385,6 +385,11 @@ have the long commit hash prepended to the format.\n \tRecreate merge commits instead of flattening the history by replaying\n \tcommits a merge commit introduces. Merge conflict resolutions or manual\n \tamendments to merge commits are not preserved.\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+\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 48d7c5ded4..e468a061f9 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -34,6 +34,7 @@\n autosquash         move commits that begin with squash!/fixup! under -i\n committer-date-is-author-date! passed to 'git am'\n ignore-date!       passed to 'git am'\n+signoff!           passed to 'git am'\n whitespace=!       passed to 'git apply'\n ignore-whitespace! passed to 'git apply'\n C=!                passed to 'git apply'\n@@ -321,7 +322,7 @@ run_pre_rebase_hook ()\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-- \n2.11.0.585.g56041942c3.dirty\n\n"},{"id":"309988","messageId":"xmqqh94ptzke.fsf@gitster.mtv.corp.google.com","threadId":"44928","inReplyTo":"20170121104904.15132-1-giuseppe.bilotta@gmail.com","subject":"Re: [PATCH] rebase: pass --signoff option to git am","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-01-23T18:13:05Z","receivedAt":"2017-01-23T18:13:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:\n\n> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n> ---\n>  Documentation/git-rebase.txt | 5 +++++\n>  git-rebase.sh                | 3 ++-\n>  2 files changed, 7 insertions(+), 1 deletion(-)\n\nShould we plan to extend this to the interactive backend that is\nshared between rebase -i and rebase -m, too?  Or is this patch\nalready sufficient to cover them?\n\n> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\n> index 67d48e6883..e6f0b93337 100644\n> --- a/Documentation/git-rebase.txt\n> +++ b/Documentation/git-rebase.txt\n> @@ -385,6 +385,11 @@ have the long commit hash prepended to the format.\n>  \tRecreate merge commits instead of flattening the history by replaying\n>  \tcommits a merge commit introduces. Merge conflict resolutions or manual\n>  \tamendments to merge commits are not preserved.\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> +\n>  +\n>  This uses the `--interactive` machinery internally, but combining it\n>  with the `--interactive` option explicitly is generally not a good\n> diff --git a/git-rebase.sh b/git-rebase.sh\n> index 48d7c5ded4..e468a061f9 100755\n> --- a/git-rebase.sh\n> +++ b/git-rebase.sh\n> @@ -34,6 +34,7 @@\n>  autosquash         move commits that begin with squash!/fixup! under -i\n>  committer-date-is-author-date! passed to 'git am'\n>  ignore-date!       passed to 'git am'\n> +signoff!           passed to 'git am'\n>  whitespace=!       passed to 'git apply'\n>  ignore-whitespace! passed to 'git apply'\n>  C=!                passed to 'git apply'\n> @@ -321,7 +322,7 @@ run_pre_rebase_hook ()\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"},{"id":"310006","messageId":"CAOxFTcyuLkvgPOxQuzaDUVuDRu_KJg=JrYtU84pQyjLstChbLg@mail.gmail.com","threadId":"44928","inReplyTo":"xmqqh94ptzke.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] rebase: pass --signoff option to git am","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2017-01-23T20:03:33Z","receivedAt":"2017-01-23T20:04:02Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"On Mon, Jan 23, 2017 at 7:13 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Should we plan to extend this to the interactive backend that is\n> shared between rebase -i and rebase -m, too?  Or is this patch\n> already sufficient to cover them?\n\nAFAIK this is sufficient for both, in the sense that I've used it with\ngit rebase -i and it works.\n"},{"id":"310010","messageId":"xmqqbmuxr0pd.fsf@gitster.mtv.corp.google.com","threadId":"44928","inReplyTo":"CAOxFTcyuLkvgPOxQuzaDUVuDRu_KJg=JrYtU84pQyjLstChbLg@mail.gmail.com","subject":"Re: [PATCH] rebase: pass --signoff option to git am","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-01-23T20:16:46Z","receivedAt":"2017-01-23T20:17:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:\n\n> On Mon, Jan 23, 2017 at 7:13 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>>\n>> Should we plan to extend this to the interactive backend that is\n>> shared between rebase -i and rebase -m, too?  Or is this patch\n>> already sufficient to cover them?\n>\n> AFAIK this is sufficient for both, in the sense that I've used it with\n> git rebase -i and it works.\n\nThat is a good news and at the same time a bit awkard one ;-)  \n\nThe mention of \"passed to 'git am'\" twice in the documentation and\nhelp text would lead people to think \"rebase -i\" would not be\naffected and (1) would need more work to do so, or (2) the user does\nnot want \"rebase -i\" to be unaffected for whatever reason, and gets\nsurprised to see that it actually does get affected.\n\nIn any case, will queue as-is so that we won't lose the patch while\nwaiting for people to raise their opinions.\n\nThanks.\n"},{"id":"310043","messageId":"CAOxFTczrLmWZg3720HMUA-13q9ADi_rK5k0x+TEYyKR=xR5b_w@mail.gmail.com","threadId":"44928","inReplyTo":"xmqqbmuxr0pd.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] rebase: pass --signoff option to git am","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2017-01-23T22:35:38Z","receivedAt":"2017-01-23T22:36:04Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"On Mon, Jan 23, 2017 at 9:16 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:\n>\n>> On Mon, Jan 23, 2017 at 7:13 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>>>\n>>> Should we plan to extend this to the interactive backend that is\n>>> shared between rebase -i and rebase -m, too?  Or is this patch\n>>> already sufficient to cover them?\n>>\n>> AFAIK this is sufficient for both, in the sense that I've used it with\n>> git rebase -i and it works.\n>\n> That is a good news and at the same time a bit awkard one ;-)\n>\n> The mention of \"passed to 'git am'\" twice in the documentation and\n> help text would lead people to think \"rebase -i\" would not be\n> affected and (1) would need more work to do so, or (2) the user does\n> not want \"rebase -i\" to be unaffected for whatever reason, and gets\n> surprised to see that it actually does get affected.\n\nI'm not sure I follow. If the user doesn't want to signoff during a\nrebase, they can simply not pass --signoff. If they do, they can not\npass it. Am I missing something?\n\n> In any case, will queue as-is so that we won't lose the patch while\n> waiting for people to raise their opinions.\n\nThanks.\n\n-- \nGiuseppe \"Oblomov\" Bilotta\n"},{"id":"310050","messageId":"xmqqsho9pdbc.fsf@gitster.mtv.corp.google.com","threadId":"44928","inReplyTo":"CAOxFTczrLmWZg3720HMUA-13q9ADi_rK5k0x+TEYyKR=xR5b_w@mail.gmail.com","subject":"Re: [PATCH] rebase: pass --signoff option to git am","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-01-23T23:27:19Z","receivedAt":"2017-01-23T23:27:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:\n\n> On Mon, Jan 23, 2017 at 9:16 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:\n>>\n>>> On Mon, Jan 23, 2017 at 7:13 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>>>>\n>>>> Should we plan to extend this to the interactive backend that is\n>>>> shared between rebase -i and rebase -m, too?  Or is this patch\n>>>> already sufficient to cover them?\n>>>\n>>> AFAIK this is sufficient for both, in the sense that I've used it with\n>>> git rebase -i and it works.\n>>\n>> That is a good news and at the same time a bit awkard one ;-)\n>>\n>> The mention of \"passed to 'git am'\" twice in the documentation and\n>> help text would lead people to think \"rebase -i\" would not be\n>> affected and (1) would need more work to do so, or (2) the user does\n>> not want \"rebase -i\" to be unaffected for whatever reason, and gets\n>> surprised to see that it actually does get affected.\n>\n> I'm not sure I follow. If the user doesn't want to signoff during a\n> rebase, they can simply not pass --signoff. If they do, they can not\n> pass it. Am I missing something?\n\nalias.\n\nWhich also means that there needs to be --no-signoff option that can\nbe given to countermand an earlier --signoff, if a user did\n\n\t[alias] rb = rebase --signoff\n\nand wants to disable it one time only with\n\n\t$ git rb --no-signoff\n\n>\n>> In any case, will queue as-is so that we won't lose the patch while\n>> waiting for people to raise their opinions.\n>\n> Thanks.\n\nThanks.  The final version would also need tests, so it may be a\ngood time to start thinking about what aspect of this feature wants\nto be protected against future breakages.\n"},{"id":"310075","messageId":"CAOxFTcwDK6tdb7xjemoxJ7rgEa9S-Ub9ZdrCEJFw98r0cUXRmw@mail.gmail.com","threadId":"44928","inReplyTo":"xmqqsho9pdbc.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] rebase: pass --signoff option to git am","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2017-01-24T07:06:18Z","receivedAt":"2017-01-24T07:07:21Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"On Tue, Jan 24, 2017 at 12:27 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:\n>>\n>> I'm not sure I follow. If the user doesn't want to signoff during a\n>> rebase, they can simply not pass --signoff. If they do, they can not\n>> pass it. Am I missing something?\n>\n> alias.\n>\n> Which also means that there needs to be --no-signoff option that can\n> be given to countermand an earlier --signoff, if a user did\n>\n>         [alias] rb = rebase --signoff\n>\n> and wants to disable it one time only with\n>\n>         $ git rb --no-signoff\n\nOh, right, good point. This should be easy, I'll give this a go.\n\n>>> In any case, will queue as-is so that we won't lose the patch while\n>>> waiting for people to raise their opinions.\n>>\n>> Thanks.\n>\n> Thanks.  The final version would also need tests, so it may be a\n> good time to start thinking about what aspect of this feature wants\n> to be protected against future breakages.\n\nI have troubles thinking how it could go wrong.  The most obvious\nthing I can think of is it could not be remembered after an\ninterruption+continue. I'll think about this some more.\n\n-- \nGiuseppe \"Oblomov\" Bilotta\n"},{"id":"310348","messageId":"CAOxFTcx1NsBfiSqQgomE5USsd0DBKtQZPQEJgnpphTRWrUn=ow@mail.gmail.com","threadId":"44928","inReplyTo":"CAOxFTcyuLkvgPOxQuzaDUVuDRu_KJg=JrYtU84pQyjLstChbLg@mail.gmail.com","subject":"Re: [PATCH] rebase: pass --signoff option to git am","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2017-01-26T18:18:31Z","receivedAt":"2017-01-26T18:54:56Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"On Mon, Jan 23, 2017 at 9:03 PM, Giuseppe Bilotta\n<giuseppe.bilotta@gmail.com> wrote:\n> On Mon, Jan 23, 2017 at 7:13 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>>\n>> Should we plan to extend this to the interactive backend that is\n>> shared between rebase -i and rebase -m, too?  Or is this patch\n>> already sufficient to cover them?\n>\n> AFAIK this is sufficient for both, in the sense that I've used it with\n> git rebase -i and it works.\n\nHm, something very strange is going on, I've just tested the patch on\ntop of current next and for some reason the signoff line does not get\nadded. The command-line option gets passed to git am, but I get no\nsignoff for some reason, so something is failing down the line, I'll\nhave to investigate.\n\n-- \nGiuseppe \"Oblomov\" Bilotta\n"}]}