{"thread":{"id":"11726","subject":"stgit: managing signed-off-by lines","startedAt":"2008-01-24T20:27:17Z","lastAt":"2008-01-25T15:40:27Z","messageCount":7,"participants":["Jon Smirl","Karl Hasselström"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"66516","messageId":"9e4733910801241227n659a5b34x7f77f25101aa225f@mail.gmail.com","threadId":"11726","inReplyTo":null,"subject":"stgit: managing signed-off-by lines","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2008-01-24T20:27:17Z","receivedAt":"2008-01-24T20:27:17Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"If I import a series of patches from one of my trees into another,\nstgit preserves the signed-off-by lines like you would expect it to.\nWhen I export these patches it adds a signed-off-by line for myself\nagain like you would expect it to. But adding this line on export\nneeds to checks and make sure that my name isn't already in the\nsigned-off-by list, without this check I have to manually remove my\nname when it gets duplicated.\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"66546","messageId":"20080125083853.GA5804@diana.vm.bytemark.co.uk","threadId":"11726","inReplyTo":"9e4733910801241227n659a5b34x7f77f25101aa225f@mail.gmail.com","subject":"Re: stgit: managing signed-off-by lines","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2008-01-25T08:38:53Z","receivedAt":"2008-01-25T08:38:53Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2008-01-24 15:27:17 -0500, Jon Smirl wrote:\n\n> If I import a series of patches from one of my trees into another,\n> stgit preserves the signed-off-by lines like you would expect it to.\n> When I export these patches it adds a signed-off-by line for myself\n> again like you would expect it to. But adding this line on export\n> needs to checks and make sure that my name isn't already in the\n> signed-off-by list, without this check I have to manually remove my\n> name when it gets duplicated.\n\nWhat command are you using to export patches?\n\nIIRC, all commands that have --sign and --ack flags already to check\nfor duplicates. But if you do something like have your sign-off line\nin the template the export command uses, that would lead to\nduplicates.\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"66565","messageId":"9e4733910801250534s7ab11b15uff3c782165a8e2ea@mail.gmail.com","threadId":"11726","inReplyTo":"20080125083853.GA5804@diana.vm.bytemark.co.uk","subject":"Re: stgit: managing signed-off-by lines","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2008-01-25T13:34:53Z","receivedAt":"2008-01-25T13:34:53Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 1/25/08, Karl Hasselström <kha@treskal.com> wrote:\n> On 2008-01-24 15:27:17 -0500, Jon Smirl wrote:\n>\n> > If I import a series of patches from one of my trees into another,\n> > stgit preserves the signed-off-by lines like you would expect it to.\n> > When I export these patches it adds a signed-off-by line for myself\n> > again like you would expect it to. But adding this line on export\n> > needs to checks and make sure that my name isn't already in the\n> > signed-off-by list, without this check I have to manually remove my\n> > name when it gets duplicated.\n>\n> What command are you using to export patches?\n\nI am using \"stg export\" from one branch and then \"stg import -s\" on\nanother. After I import the patch and do 'stg edit' on it, it has the\nsigned-off-by line in it.  When it is export from that branch the\nsigned-off-by get added again.\n\nYou don't want to strip the signed-off-by lines on import, they may be\nfrom other people. I would think that on export you could look and see\nif my signed-off-by line is already on the patch before adding it\nagain.\n\nI might be able to handle this better by rebasing my master from both\nlinus/master and my branch containing these i2c patches that are\ntaking so long to get in. That would avoid the import/export step. But\nthen I can't edit the patches directly on my master branch.\n\n>\n> IIRC, all commands that have --sign and --ack flags already to check\n> for duplicates. But if you do something like have your sign-off line\n> in the template the export command uses, that would lead to\n> duplicates.\n>\n> --\n> Karl Hasselström, kha@treskal.com\n>       www.treskal.com/kalle\n>\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"66566","messageId":"20080125143026.GA10132@diana.vm.bytemark.co.uk","threadId":"11726","inReplyTo":"9e4733910801250534s7ab11b15uff3c782165a8e2ea@mail.gmail.com","subject":"Re: stgit: managing signed-off-by lines","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2008-01-25T14:30:26Z","receivedAt":"2008-01-25T14:30:26Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2008-01-25 08:34:53 -0500, Jon Smirl wrote:\n\n> On 1/25/08, Karl Hasselström <kha@treskal.com> wrote:\n>\n> > What command are you using to export patches?\n>\n> I am using \"stg export\" from one branch and then \"stg import -s\" on\n> another. After I import the patch and do 'stg edit' on it, it has\n> the signed-off-by line in it. When it is export from that branch the\n> signed-off-by get added again.\n>\n> You don't want to strip the signed-off-by lines on import, they may\n> be from other people. I would think that on export you could look\n> and see if my signed-off-by line is already on the patch before\n> adding it again.\n\nI haven't set up my templates to add sign-offs on export; instead, I\ngive --sign to \"stg import\". This always does the right thing:\n\n  1. It's smart enough to notice if my sign-off is already there, and\n     don't add another copy.\n\n  2. My sign-off is propagated even if the patches are transferred by\n     pulling instead of by email or \"stg export\".\n\nFor patches that I write myself (so that they are never \"stg\nimport\"ed), I add the sign-off manually in the commit message, with\nthe aid of this elisp snippet:\n\n  (defun sign-off ()\n    \"Insert sign-off line.\"\n    (interactive)\n    (git-append-sign-off (git-get-committer-name) (git-get-committer-email))))\n\nAdding the sign-off conditionally in \"stg mail\" and \"stg export\", as\nyou suggest, could of course be done. But that would have to be\ncommand line options, since the template system can't really express\nthat kind of transformation.\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"66567","messageId":"20080125143424.GB10132@diana.vm.bytemark.co.uk","threadId":"11726","inReplyTo":"9e4733910801250534s7ab11b15uff3c782165a8e2ea@mail.gmail.com","subject":"Re: stgit: managing signed-off-by lines","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2008-01-25T14:34:24Z","receivedAt":"2008-01-25T14:34:24Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2008-01-25 08:34:53 -0500, Jon Smirl wrote:\n\n> I am using \"stg export\" from one branch and then \"stg import -s\" on\n> another. After I import the patch and do 'stg edit' on it, it has\n> the signed-off-by line in it.\n\nPass --sign to \"stg import\" to add the sob line automatically.\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"66568","messageId":"9e4733910801250643u11819491i961d092deae7c5d7@mail.gmail.com","threadId":"11726","inReplyTo":"20080125143026.GA10132@diana.vm.bytemark.co.uk","subject":"Re: stgit: managing signed-off-by lines","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2008-01-25T14:43:51Z","receivedAt":"2008-01-25T14:43:51Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 1/25/08, Karl Hasselström <kha@treskal.com> wrote:\n> On 2008-01-25 08:34:53 -0500, Jon Smirl wrote:\n>\n> > On 1/25/08, Karl Hasselström <kha@treskal.com> wrote:\n> >\n> > > What command are you using to export patches?\n> >\n> > I am using \"stg export\" from one branch and then \"stg import -s\" on\n> > another. After I import the patch and do 'stg edit' on it, it has\n> > the signed-off-by line in it. When it is export from that branch the\n> > signed-off-by get added again.\n> >\n> > You don't want to strip the signed-off-by lines on import, they may\n> > be from other people. I would think that on export you could look\n> > and see if my signed-off-by line is already on the patch before\n> > adding it again.\n>\n> I haven't set up my templates to add sign-offs on export; instead, I\n> give --sign to \"stg import\". This always does the right thing:\n>\n>   1. It's smart enough to notice if my sign-off is already there, and\n>      don't add another copy.\n>\n>   2. My sign-off is propagated even if the patches are transferred by\n>      pulling instead of by email or \"stg export\".\n\nYes, I added Signed-of-by to the export and mail templates. I did it\nsix months ago and I had forgotten. I can fix this by just removing it\nfrom the export template. I've learned to use 'stg mail' now and it is\nthe only way I publicly expose patches. It works to just add the\nSigned-off-by at the email stage.\n\nLonger term you may want to add a de-dupe check for the signed-off-by\nlines that gets called in all contexts.\n>\n> For patches that I write myself (so that they are never \"stg\n> import\"ed), I add the sign-off manually in the commit message, with\n> the aid of this elisp snippet:\n>\n>   (defun sign-off ()\n>     \"Insert sign-off line.\"\n>     (interactive)\n>     (git-append-sign-off (git-get-committer-name) (git-get-committer-email))))\n>\n> Adding the sign-off conditionally in \"stg mail\" and \"stg export\", as\n> you suggest, could of course be done. But that would have to be\n> command line options, since the template system can't really express\n> that kind of transformation.\n>\n> --\n> Karl Hasselström, kha@treskal.com\n>       www.treskal.com/kalle\n>\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"66572","messageId":"20080125154027.GA11526@diana.vm.bytemark.co.uk","threadId":"11726","inReplyTo":"9e4733910801250643u11819491i961d092deae7c5d7@mail.gmail.com","subject":"Re: stgit: managing signed-off-by lines","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2008-01-25T15:40:27Z","receivedAt":"2008-01-25T15:40:27Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2008-01-25 09:43:51 -0500, Jon Smirl wrote:\n\n> Longer term you may want to add a de-dupe check for the\n> signed-off-by lines that gets called in all contexts.\n\nMmm. You mean some kind of sanity check filter that's applied after\nthe template? I guess we could do that, but it feels like that kind of\napproach could easily get out of hand.\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"}]}