git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Issac Trotts <issac.trotts@gmail.com>
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: Mon, 17 Dec 2018 10:59:15 -0500	[thread overview]
Message-ID: <20181217155915.GA914@sigill.intra.peff.net> (raw)
In-Reply-To: <CANdyxMwxPqTMfLsoK-2JT3Wf3hXZnQNCPRS04aSHzsMbYJZo-Q@mail.gmail.com>

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

  parent reply	other threads:[~2018-12-17 15:59 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 [this message]
2018-12-18 17:14   ` Issac Trotts
2018-12-19  3:47     ` Issac Trotts
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=20181217155915.GA914@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=issac.trotts@gmail.com \
    --cc=noemi@sourcegraph.com \
    /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).