git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Issac Trotts <issac.trotts@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, Noemi Mercado <noemi@sourcegraph.com>
Subject: Re: [PATCH] log: add %S option (like --source) to log --format
Date: Tue, 18 Dec 2018 19:47:36 -0800	[thread overview]
Message-ID: <CANdyxMzOpRRu+B0cq5cbrmYsy47cod8N4mWrGtfOgRRgKVh+xA@mail.gmail.com> (raw)
In-Reply-To: <CANdyxMzsf00k44TVkw+9uL4E3G_0rjYNgiMFK2o7MX83fCMPMQ@mail.gmail.com>

On Tue, Dec 18, 2018 at 9:14 AM Issac Trotts <issac.trotts@gmail.com> wrote:
>
> 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.

Okay, found it. My solution is to make %S not do anything for commands
other than `log` since `log` is the only one that has --source defined
as far as I can tell.

I'm waiting for Travis to run and will post an updated patch if
everything looks good there.

> Issac
>
> On Mon, Dec 17, 2018 at 7:59 AM Jeff King <peff@peff.net> 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.
> >
> > -Peff

  reply	other threads:[~2018-12-19  3:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17  6:25 [PATCH] log: add %S option (like --source) to log --format Issac Trotts
2018-12-17  9:31 ` Junio C Hamano
2018-12-18  3:35   ` Issac Trotts
2018-12-17 15:59 ` Jeff King
2018-12-18 17:14   ` Issac Trotts
2018-12-19  3:47     ` Issac Trotts [this message]
2018-12-19  8:07       ` Issac Trotts
2018-12-19 17:09         ` Issac Trotts
  -- strict thread matches above, loose matches on Subject: below --
2018-12-19  8:33 issac.trotts
2018-12-21  5:24 ` Issac Trotts
2018-12-22 22:22   ` Jeff King
2018-12-25  2:12     ` Issac Trotts
2018-12-27 13:20 ` Derrick Stolee
2018-12-28 18:14   ` Junio C Hamano
2018-12-31  4:35   ` Issac Trotts
2018-12-31  4:53 issac.trotts
2019-01-02 19:33 ` Junio C Hamano
2019-01-08 13:14   ` Issac Trotts
2018-12-31 21:48 issac.trotts
2019-01-08 13:20 issac.trotts
2019-01-08 22:21 ` Junio C Hamano
2019-01-11  6:28   ` Issac Trotts
2019-01-11 17:37     ` Junio C Hamano
2019-01-11 17:47     ` Junio C Hamano
2019-01-11  6:30 issac.trotts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANdyxMzOpRRu+B0cq5cbrmYsy47cod8N4mWrGtfOgRRgKVh+xA@mail.gmail.com \
    --to=issac.trotts@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=noemi@sourcegraph.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).