Re: [PATCH] log: add %S option (like --source) to log --format
- Date: Mon, 17 Dec 2018 10:59:15 -0500
- From: Jeff King <peff@xxxxxxxx>
- Subject: Re: [PATCH] log: add %S option (like --source) to log --format
On Sun, Dec 16, 2018 at 10:25:14PM -0800, Issac Trotts wrote:
> Make it possible to write for example
> git log --format="%H,%S"
> where the %S at the end is a new placeholder that prints out the ref
> (tag/branch) for each commit.
Seems like a reasonable thing to want.
One curious thing about "--source" is that it requires cooperation from
the actual traversal. So if you did:
git rev-list | git diff-tree --format="%H %S"
we don't have the %S information in the latter command. I think that's
probably acceptable as long as it does something sane when we don't have
that information (e.g., replace it with an empty string). It might also
be worth calling out in the documentation.