{"thread":{"id":"13975","subject":"How to omit/alter the sigend-off line in a patch set?","startedAt":"2008-06-16T10:24:58Z","lastAt":"2008-06-16T11:26:52Z","messageCount":2,"participants":["Ian Brown","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"80013","messageId":"d0383f90806160324j3f1b2a09tbb4caa1e934c7635@mail.gmail.com","threadId":"13975","inReplyTo":null,"subject":"How to omit/alter the sigend-off line in a patch set?","fromName":"Ian Brown","fromEmail":"ianbrn@gmail.com","sentAt":"2008-06-16T10:24:58Z","receivedAt":"2008-06-16T10:24:58Z","isPatch":false,"sender":{"key":"ianbrn@gmail.com","avatar":null},"body":"Hello,\n\n  I am creating a patch set in this way:\nI make a change in one file, than commit it. (git commit file1)\nThen I make a change in a second file, than commit it. (git commit file1)\nand so on.\n\nThen I create a patch set thus:\n\ngit-format-patch -M -s -n -o patchdir origin\n\nAnd a number of patch files are created, according to the number of commits\nI had made.\n\n\nNow, in each created patch file there is a line saying:\nSigned-off-by: root <root@hostName.(none)>\n\n\nWhich is caused as I am doing this patches as root, and the machine name is\nhostName (and the domain name is none).\n\nNow, is there a way to cause git-format-patch to omit this\nSigned-off-by: root <root@hostName.(none)> line ?\nOr, altetnatively, is there a way to cause the git-format-patch to\ngenerate a differnet\nsigned off by line (like signed off by ianbrn@gmail.com)?\n\nI had tried using the --signoff option for  git-format-patch , in\nthese two ways,\nbut got an error:\n\ngit-format-patch --signoff=ianbrn@gmail.com -M -n -o patchdir origin\nfatal: unrecognized argument: --signoff=ianbrn@gmail.com\n\ngit-format-patch --signoff ianbrn@gmail.com -M -n -o patchdir origin\nfatal: ambiguous argument 'ianbrn@gmail.com': unknown revision or path\nnot in the working tree.\nUse '--' to separate paths from revisions\n\nI also tried to use the -a flag for commit\ngit-commit -a ianbrn@gmail.com\nbut again it did not help either.\n\nAny ideas?\n\nAny help will be appreciated,\n\n\nRegards,\nIan\n"},{"id":"80019","messageId":"m33andpqmi.fsf@localhost.localdomain","threadId":"13975","inReplyTo":"d0383f90806160324j3f1b2a09tbb4caa1e934c7635@mail.gmail.com","subject":"Re: How to omit/alter the sigend-off line in a patch set?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-16T11:26:52Z","receivedAt":"2008-06-16T11:26:52Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"\"Ian Brown\" <ianbrn@gmail.com> writes:\n\n> I am creating a patch set in this way:\n>\n> I make a change in one file, than commit it. (git commit file1)\n> Then I make a change in a second file, than commit it. (git commit\n> file1) and so on.\n\nSo you don't add Signed-off-by to yout commit.  If you plan on sharing\nyour work not only by sending patches, but by publishing your\nrepository somwehere, it would be better to signoff your commit, so\nS-o-b is in \"history\", not only in mailing list archive...\n\nThis can be done by using '-s' option to git-commit, i.e.\n  $ git commit -s file1\nor by adding signoff to your commit template, if you use it.\n\nBy the way, usually one uses either\n  $ git add file1; git commit\nor\n  $ git commit -a\n(optionally with signoff).\n\n> Then I create a patch set thus:\n> \n> git-format-patch -M -s -n -o patchdir origin\n\nAdding '-s | --signoff' option is what creates Signed-off-by line.\n\n> And a number of patch files are created, according to the number of\n> commits I had made.\n> \n> \n> Now, in each created patch file there is a line saying:\n> Signed-off-by: root <root@hostName.(none)>\n> \n> \n> Which is caused as I am doing this patches as root, and the machine\n> name is hostName (and the domain name is none).\n\nWHY do you work as ROOT?\n\n> Now, is there a way to cause git-format-patch to omit this\n> Signed-off-by: root <root@hostName.(none)> line ?\n\nSimply do not add '-s' option to git-format-patch, and if signoff line\nwas not present in commit, it wouldn't be present in patch.\n\n> Or, altetnatively, is there a way to cause the git-format-patch to\n> generate a different signed off by line (like signed off by\n> ianbrn@gmail.com)?\n\nYou can configure git, either in repository config (.git/config),\nor in your user config (~/.gitconfig) by adding the following\n\n-- cut starts here --\n[user]\n\tname  = Ian Brown\n\temail = ianbrn@gmail.com\n-- cut ends here --\n\nYou can use git-config to set those config variables, but I think\nediting simple ini-like text file is simpler.  But if you prefer,\nthere is scriptable solution:\n\n  $ git config --global user.name \"Ian Brown\"\n  $ git config --global user.email ianbrn@gmail.com\n\n> I had tried using the --signoff option for git-format-patch, in\n> these two ways, but got an error:\n> \n> git-format-patch --signoff=ianbrn@gmail.com -M -n -o patchdir origin\n> fatal: unrecognized argument: --signoff=ianbrn@gmail.com\n\nAccording to git-format-patch(1) manpage the --signoff option does not\naccept any parameters.  It always uses committer identity of yourself.\n\n> I also tried to use the -a flag for commit\n>   $ git-commit -a ianbrn@gmail.com\n> but again it did not help either.\n\nPlease, please read the documentation.  git-commit -a has _nothing_ to\ndo with signoff...\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"}]}