If I import a series of patches from one of my trees into another, stgit preserves the signed-off-by lines like you would expect it to. When I export these patches it adds a signed-off-by line for myself again like you would expect it to. But adding this line on export needs to checks and make sure that my name isn't already in the signed-off-by list, without this check I have to manually remove my name when it gets duplicated. -- Jon Smirl jonsmirl@gmail.com -
What command are you using to export patches? IIRC, all commands that have --sign and --ack flags already to check for duplicates. But if you do something like have your sign-off line in the template the export command uses, that would lead to duplicates. -- Karl Hasselström, kha@treskal.com www.treskal.com/kalle -
I am using "stg export" from one branch and then "stg import -s" on another. After I import the patch and do 'stg edit' on it, it has the signed-off-by line in it. When it is export from that branch the signed-off-by get added again. You don't want to strip the signed-off-by lines on import, they may be from other people. I would think that on export you could look and see if my signed-off-by line is already on the patch before adding it again. I might be able to handle this better by rebasing my master from both linus/master and my branch containing these i2c patches that are taking so long to get in. That would avoid the import/export step. But -- Jon Smirl jonsmirl@gmail.com -
I haven't set up my templates to add sign-offs on export; instead, I
give --sign to "stg import". This always does the right thing:
1. It's smart enough to notice if my sign-off is already there, and
don't add another copy.
2. My sign-off is propagated even if the patches are transferred by
pulling instead of by email or "stg export".
For patches that I write myself (so that they are never "stg
import"ed), I add the sign-off manually in the commit message, with
the aid of this elisp snippet:
(defun sign-off ()
"Insert sign-off line."
(interactive)
(git-append-sign-off (git-get-committer-name) (git-get-committer-email))))
Adding the sign-off conditionally in "stg mail" and "stg export", as
you suggest, could of course be done. But that would have to be
command line options, since the template system can't really express
that kind of transformation.
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle
-
Yes, I added Signed-of-by to the export and mail templates. I did it six months ago and I had forgotten. I can fix this by just removing it from the export template. I've learned to use 'stg mail' now and it is the only way I publicly expose patches. It works to just add the Signed-off-by at the email stage. Longer term you may want to add a de-dupe check for the signed-off-by -- Jon Smirl jonsmirl@gmail.com -
Mmm. You mean some kind of sanity check filter that's applied after the template? I guess we could do that, but it feels like that kind of approach could easily get out of hand. -- Karl Hasselström, kha@treskal.com www.treskal.com/kalle -
Pass --sign to "stg import" to add the sob line automatically. -- Karl Hasselström, kha@treskal.com www.treskal.com/kalle -
