{"thread":{"id":"44746","subject":"config for `format-patch --notes`?","startedAt":"2016-12-21T00:18:23Z","lastAt":"2016-12-22T00:01:05Z","messageCount":2,"participants":["Norbert Kiesel","Johan Herland"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"308190","messageId":"CAM+g_NtsSaiZdy2Pq0gR9AaO6xiNnGSUbj5yd-uW3S80roEGCg@mail.gmail.com","threadId":"44746","inReplyTo":null,"subject":"config for `format-patch --notes`?","fromName":"Norbert Kiesel","fromEmail":"nkiesel@gmail.com","sentAt":"2016-12-21T00:18:16Z","receivedAt":"2016-12-21T00:18:23Z","isPatch":false,"sender":{"key":"nkiesel@gmail.com","avatar":null},"body":"Hi,\n\nI use `git format-patch master..myBranch` quite a bit to send patches\nto other developers.  I also add notes to the commits\nso that I e.g. remember which patches were emailed to whom.  `git log`\nhas an option to automatically include the notes in\nthe output.  However, I can't find such an option for `git\nformat-patch`.  Am I missing something?\n\nAnother nice option would to to somehow include the branch name in the\nresulting output.  Right now I use either notes\nor abuse the `--subject` option for this.\n\n</nk>\n\nP.S.: Today I'm sad and proud to say \"Ich bin ein Berliner!\" --nk\n"},{"id":"308231","messageId":"CALKQrgekuu4d5EFLpT=sH+qCJSJdb9O0Zttw348UXffGDuwFzQ@mail.gmail.com","threadId":"44746","inReplyTo":"CAM+g_NtsSaiZdy2Pq0gR9AaO6xiNnGSUbj5yd-uW3S80roEGCg@mail.gmail.com","subject":"Re: config for `format-patch --notes`?","fromName":"Johan Herland","fromEmail":"johan@herland.net","sentAt":"2016-12-22T00:00:21Z","receivedAt":"2016-12-22T00:01:05Z","isPatch":false,"sender":{"key":"johan@herland.net","avatar":"https://avatars.githubusercontent.com/u/547031?v=4"},"body":"On Wed, Dec 21, 2016 at 1:18 AM, Norbert Kiesel <nkiesel@gmail.com> wrote:\n> Hi,\n>\n> I use `git format-patch master..myBranch` quite a bit to send patches\n> to other developers.  I also add notes to the commits\n> so that I e.g. remember which patches were emailed to whom.  `git log`\n> has an option to automatically include the notes in\n> the output.  However, I can't find such an option for `git\n> format-patch`.  Am I missing something?\n\nI assume you mean _config_ option here (format-patch has had a --notes\ncommand-line option since v1.8.1). AFAICS, there's no config option\nthat corresponds to the format-patch --notes command-line option.\n\nYou can easily alias or script your way around this, e.g.:\n\n  git config alias.fp 'format-patch --notes'\n\nThis creates a 'git fp' command that does what you want, I believe.\n\nAlternatively, if you need more control/automation of the resulting\npatches, you can write a script to edit the output files from\nformat-patch. Currently, I don't believe there is any format-patch\nhook available to automatically trigger such a script, but, again,\nthat can be achieved with an alias.\n\nIf you believe a config option would be a useful addition for more\nusers than yourself, I am sure the community welcomes patches adding\na format.notes config option.\n\n> Another nice option would to to somehow include the branch name in the\n> resulting output.  Right now I use either notes\n> or abuse the `--subject` option for this.\n\nFrom git-config(1):\n\n    branch.<name>.description\n        Branch description, can be edited with git branch\n        --edit-description. Branch description is automatically added\n        in the format-patch cover letter or request-pull summary.\n\n\n...Johan\n\n-- \nJohan Herland, <johan@herland.net>\nwww.herland.net\n"}]}