git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] pretty: format aliases
@ 2010-04-25 21:56 Will Palmer
  2010-04-25 21:56 ` [PATCH v2 1/3] pretty: add conditional %C?colorname placeholders Will Palmer
  0 siblings, 1 reply; 27+ messages in thread
From: Will Palmer @ 2010-04-25 21:56 UTC (permalink / raw)
  To: git; +Cc: wmpalmer, gitster, peff

The following patch series adds the ability to configure aliases for
user-defined formats. The first two patches define new placeholders and
modify the output of existing placeholders to allow aliases to be more
consistent with the way builtin formats are handled. The final patch
adds support for the aliases themselves.

There were a couple of places where I wasn't entirely sure about which
color setting I should be following, but I've tried to be consistent
throughout. It may be that I could have simply followed diffopt's color
option in all cases, in which case various modifications to show_log()
were entirely unnecessary. I'll await judgement at the hands of one who
groks those sections more than I do, but I think what I've done feels
correct.

My original goal was to make it possible to define all of the builtin
formats as builtin aliases to format strings, but complications
regarding how --parents and --decorate would be handled require further
thought and discussion. For example, we could simply make
"--format=%H --decorate" synonymous with "--format=%H%d", but I'm not
sure if that feels clean enough.

For now, I think this is at a point where its good-enough to submit, if
only as a starting point for some discussion as to where to head next.

This is the second version of the patch. Following feedback from Jeff
King <peff@peff.net>, I realized that the modification to the arguments
of show_log() were unnecessary, as they only made a difference within
show-branch.c, which does not accept a --format option in any case.

Will Palmer (3):
  pretty: add conditional %C?colorname placeholders
  pretty: make %H/%h dependent on --abbrev[-commit]
  pretty: add aliases for pretty formats

 Documentation/config.txt         |    8 ++
 Documentation/pretty-formats.txt |    1 +
 builtin/log.c                    |    2 +-
 builtin/rev-list.c               |    2 +
 builtin/shortlog.c               |    7 +-
 commit.h                         |    2 +
 log-tree.c                       |    3 +
 pretty.c                         |  248 ++++++++++++++++++++++++++++++--------
 shortlog.h                       |    2 +-
 t/t4205-log-pretty-formats.sh    |   87 +++++++++++++
 10 files changed, 307 insertions(+), 55 deletions(-)
 create mode 100755 t/t4205-log-pretty-formats.sh

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

end of thread, other threads:[~2010-04-26 22:12 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-25 21:56 [PATCH v2 0/3] pretty: format aliases Will Palmer
2010-04-25 21:56 ` [PATCH v2 1/3] pretty: add conditional %C?colorname placeholders Will Palmer
2010-04-25 21:56   ` [PATCH v2 2/3] pretty: make %H/%h dependent on --abbrev[-commit] Will Palmer
2010-04-25 21:56     ` [PATCH v2 3/3] pretty: add aliases for pretty formats Will Palmer
2010-04-26  7:25       ` Jonathan Nieder
2010-04-26  8:15         ` Will Palmer
2010-04-26 22:11         ` Will Palmer
2010-04-26  3:11     ` [PATCH v2 2/3] pretty: make %H/%h dependent on --abbrev[-commit] Jonathan Nieder
2010-04-26  3:31       ` Jeff King
2010-04-26  3:38         ` Jonathan Nieder
2010-04-26  3:41           ` Jonathan Nieder
2010-04-26  3:45             ` Jeff King
2010-04-26  3:42           ` Jeff King
2010-04-26  7:47       ` Will Palmer
2010-04-26  9:53         ` Jonathan Nieder
2010-04-26  9:58           ` [PATCH 1/4] t4201 (shortlog): guard setup with test_expect_success Jonathan Nieder
2010-04-26  9:59           ` [PATCH 2/4] t4201 (shortlog): Test output format with multiple authors Jonathan Nieder
2010-04-26  9:59           ` [PATCH 3/4] shortlog: Document and test --format option Jonathan Nieder
2010-04-26 10:00           ` [PATCH 4/4] pretty: Respect --abbrev option Jonathan Nieder
2010-04-26 10:13           ` [PATCH v2 2/3] pretty: make %H/%h dependent on --abbrev[-commit] Will Palmer
2010-04-26 10:19             ` Jonathan Nieder
2010-04-26 10:23               ` Will Palmer
2010-04-26 10:28                 ` Jonathan Nieder
2010-04-26  2:13   ` [PATCH v2 1/3] pretty: add conditional %C?colorname placeholders Jonathan Nieder
2010-04-26  3:26     ` Jeff King
2010-04-26  4:14       ` Jonathan Nieder
2010-04-26 14:28         ` Jeff King

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).