git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* config for `format-patch --notes`?
@ 2016-12-21  0:18 Norbert Kiesel
  2016-12-22  0:00 ` Johan Herland
  0 siblings, 1 reply; 3+ messages in thread
From: Norbert Kiesel @ 2016-12-21  0:18 UTC (permalink / raw)
  To: git

Hi,

I use `git format-patch master..myBranch` quite a bit to send patches
to other developers.  I also add notes to the commits
so that I e.g. remember which patches were emailed to whom.  `git log`
has an option to automatically include the notes in
the output.  However, I can't find such an option for `git
format-patch`.  Am I missing something?

Another nice option would to to somehow include the branch name in the
resulting output.  Right now I use either notes
or abuse the `--subject` option for this.

</nk>

P.S.: Today I'm sad and proud to say "Ich bin ein Berliner!" --nk

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: config for `format-patch --notes`?
  2016-12-21  0:18 config for `format-patch --notes`? Norbert Kiesel
@ 2016-12-22  0:00 ` Johan Herland
  0 siblings, 0 replies; 3+ messages in thread
From: Johan Herland @ 2016-12-22  0:00 UTC (permalink / raw)
  To: Norbert Kiesel; +Cc: Git mailing list

On Wed, Dec 21, 2016 at 1:18 AM, Norbert Kiesel <nkiesel@gmail.com> wrote:
> Hi,
>
> I use `git format-patch master..myBranch` quite a bit to send patches
> to other developers.  I also add notes to the commits
> so that I e.g. remember which patches were emailed to whom.  `git log`
> has an option to automatically include the notes in
> the output.  However, I can't find such an option for `git
> format-patch`.  Am I missing something?

I assume you mean _config_ option here (format-patch has had a --notes
command-line option since v1.8.1). AFAICS, there's no config option
that corresponds to the format-patch --notes command-line option.

You can easily alias or script your way around this, e.g.:

  git config alias.fp 'format-patch --notes'

This creates a 'git fp' command that does what you want, I believe.

Alternatively, if you need more control/automation of the resulting
patches, you can write a script to edit the output files from
format-patch. Currently, I don't believe there is any format-patch
hook available to automatically trigger such a script, but, again,
that can be achieved with an alias.

If you believe a config option would be a useful addition for more
users than yourself, I am sure the community welcomes patches adding
a format.notes config option.

> Another nice option would to to somehow include the branch name in the
> resulting output.  Right now I use either notes
> or abuse the `--subject` option for this.

From git-config(1):

    branch.<name>.description
        Branch description, can be edited with git branch
        --edit-description. Branch description is automatically added
        in the format-patch cover letter or request-pull summary.


...Johan

-- 
Johan Herland, <johan@herland.net>
www.herland.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: config for `format-patch --notes`?
@ 2016-12-22  7:08 Norbert Kiesel
  0 siblings, 0 replies; 3+ messages in thread
From: Norbert Kiesel @ 2016-12-22  7:08 UTC (permalink / raw)
  To: johan; +Cc: git, nkiesel

Thanks for the reply.  I did not knew that branch descriptions
automatically make it in the cover letter.
Learned something new!

Unfortunately this would still mean I have to manually add the branch
name to the branch description.

I will try to create a patch for adding a config option for the
--notes command line option over the upcoming
free days.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-22  7:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-21  0:18 config for `format-patch --notes`? Norbert Kiesel
2016-12-22  0:00 ` Johan Herland
  -- strict thread matches above, loose matches on Subject: below --
2016-12-22  7:08 Norbert Kiesel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).