Re: [PATCH] log: add %S option (like --source) to log --format
- Date: Tue, 18 Dec 2018 09:14:06 -0800
- From: Issac Trotts <issac.trotts@xxxxxxxxx>
- Subject: Re: [PATCH] log: add %S option (like --source) to log --format
Hi Peff, thanks for the feedback. I tried a variant of the command you
showed and it yielded a seg fault:
[ issactrotts ~/git ] ./git diff-tree -s --pretty=tformat:'%S %H %s' HEAD
Segmentation fault: 11
I'll see if I can track it down this evening.
On Mon, Dec 17, 2018 at 7:59 AM Jeff King <peff@xxxxxxxx> wrote:
> 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.