From: Will Palmer <wmpalmer@gmail.com>
To: git@vger.kernel.org
Cc: wmpalmer@gmail.com, gitster@pobox.com
Subject: [PATCH 0/3] pretty: format aliases
Date: Sun, 25 Apr 2010 16:42:52 +0100 [thread overview]
Message-ID: <1272210175-20484-1-git-send-email-wmpalmer@gmail.com> (raw)
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.
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 +-
builtin/show-branch.c | 1 +
combine-diff.c | 11 +-
commit.h | 2 +
log-tree.c | 11 ++-
log-tree.h | 2 +-
pretty.c | 248 ++++++++++++++++++++++++++++++--------
shortlog.h | 2 +-
t/t4205-log-pretty-formats.sh | 87 +++++++++++++
13 files changed, 321 insertions(+), 63 deletions(-)
create mode 100755 t/t4205-log-pretty-formats.sh
next reply other threads:[~2010-04-25 15:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-25 15:42 Will Palmer [this message]
2010-04-25 15:42 ` [PATCH 1/3] pretty: add conditional %C?colorname placeholders Will Palmer
2010-04-26 6:30 ` Alex Riesen
[not found] ` <r2o5b9751661004260113m7b6c387bm8467a063c13e5a0f@mail.gmail.com>
2010-04-26 8:20 ` Will Palmer
2010-04-25 15:42 ` [PATCH 2/3] pretty: make %H/%h dependent on --abbrev[-commit] Will Palmer
2010-04-25 15:42 ` [PATCH 3/3] pretty: add aliases for pretty formats Will Palmer
2010-04-25 19:48 ` [PATCH 0/3] pretty: format aliases Jeff King
2010-04-25 20:40 ` Will Palmer
2010-04-25 22:09 ` Jonathan Nieder
2010-04-26 17:22 ` Jeff King
2010-04-26 17:57 ` Jonathan Nieder
2010-04-26 18:07 ` Jeff King
2010-04-26 18:37 ` Jonathan Nieder
2010-04-26 21:14 ` Will Palmer
2010-04-26 22:00 ` Jonathan Nieder
2010-04-27 1:25 ` Jeff King
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1272210175-20484-1-git-send-email-wmpalmer@gmail.com \
--to=wmpalmer@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
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).