From: Thomas Rast <trast@student.ethz.ch>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>, Jef Driesen <jefdriesen@hotmail.com>,
Nanako Shiraishi <nanako3@lavabit.com>, <git@vger.kernel.org>
Subject: [PATCH v4 0/5] Pretty formats for reflog data
Date: Mon, 19 Oct 2009 17:48:07 +0200 [thread overview]
Message-ID: <cover.1255966426.git.trast@student.ethz.ch> (raw)
In-Reply-To: <7vaazonwtr.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
>
> One solution to help the compiler catch this kind of semantic crash upon
> merging or applying code based on the old format_commit_message() would
> have been to change its function signature (or even the name), so that it
> would not go unnoticed that DATE_NORMAL that happens to be "0" is silently
> interpreted as (void *)0 == NULL.
Indeed, that would have been a good idea. (I still don't fully see
the use of allowing an enum value as a pointer, but apparently the
standard's that way.)
I fixed the calls to format_commit_message(), but without changing the
function signature compared to the last patch. I also decided not to
put in the test case; the easiest I could come up with was the
following:
-- 8< --
diff --git i/t/t5001-archive-attr.sh w/t/t5001-archive-attr.sh
index 426b319..0950527 100755
--- i/t/t5001-archive-attr.sh
+++ w/t/t5001-archive-attr.sh
@@ -4,7 +4,7 @@ test_description='git archive attribute tests'
. ./test-lib.sh
-SUBSTFORMAT=%H%n
+SUBSTFORMAT=%H%ad%n
test_expect_exists() {
test_expect_success " $1 exists" "test -e $1"
-- >8 --
which immediately fails most tests in the file because of segfaults
with the buggy series. However, it still wouldn't catch other broken
callers, if there were any, so I left it out.
Compared to v3, I also rebased the series on current master, which
conflicted with 7f98ebc (format_commit_message(): fix function
signature, 2009-10-15) so you now need that commit to apply it.
Finally, I squashed a revert of 0a0c342 (git-stash documentation:
mention default options for 'list', 2009-10-12) into 5/5 since there
are no more default options after my patch.
Thomas Rast (5):
Refactor pretty_print_commit arguments into a struct
reflog-walk: refactor the branch@{num} formatting
Introduce new pretty formats %g[sdD] for reflog information
stash list: use new %g formats instead of sed
stash list: drop the default limit of 10 stashes
Documentation/git-stash.txt | 3 +-
Documentation/pretty-formats.txt | 9 ++++
archive.c | 4 +-
builtin-branch.c | 3 +-
builtin-checkout.c | 3 +-
builtin-commit.c | 8 +++-
builtin-log.c | 3 +-
builtin-merge.c | 7 ++-
builtin-rev-list.c | 7 ++-
builtin-shortlog.c | 9 +++-
builtin-show-branch.c | 4 +-
commit.h | 20 ++++++---
git-stash.sh | 8 +---
log-tree.c | 25 ++++++-----
pretty.c | 44 ++++++++++++++------
reflog-walk.c | 83 ++++++++++++++++++++++++++++----------
reflog-walk.h | 8 ++++
t/t6006-rev-list-format.sh | 18 ++++++++
18 files changed, 189 insertions(+), 77 deletions(-)
next prev parent reply other threads:[~2009-10-19 15:49 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-12 15:47 git stash list with more than 10 items? Jef Driesen
2009-10-12 17:52 ` Jeff King
2009-10-12 19:37 ` [PATCH] git-stash documentation: mention default options for 'list' Miklos Vajna
2009-10-12 19:39 ` Jeff King
2009-10-12 21:06 ` [RFC PATCH 0/5] Pretty formats for reflog data Thomas Rast
2009-10-12 21:06 ` [RFC PATCH 1/5] reflog-walk: refactor the branch@{num} formatting Thomas Rast
2009-10-12 21:06 ` [RFC PATCH 2/5] Introduce new pretty formats %g and %G for reflog information Thomas Rast
2009-10-14 4:59 ` Jeff King
2009-10-14 9:58 ` Thomas Rast
2009-10-14 9:13 ` Junio C Hamano
2009-10-12 21:06 ` [RFC PATCH 3/5] stash: Use new %g/%G formats instead of sed Thomas Rast
2009-10-14 5:00 ` Jeff King
2009-10-12 21:06 ` [RFC PATCH 4/5] stash list: drop the default limit of 10 stashes Thomas Rast
2009-10-14 5:02 ` Jeff King
2009-10-12 21:06 ` [RFC PATCH 5/5] stash: change built-in ref to 'stash' instead of 'refs/stash' Thomas Rast
2009-10-14 5:06 ` Jeff King
2009-10-15 22:41 ` [PATCH v2 0/5] Pretty formats for reflog data Thomas Rast
2009-10-15 22:41 ` [PATCH v2 1/5] Refactor pretty_print_commit arguments into a struct Thomas Rast
2009-10-15 22:41 ` [PATCH v2 2/5] reflog-walk: refactor the branch@{num} formatting Thomas Rast
2009-10-15 22:41 ` [PATCH v2 3/5] Introduce new pretty formats %g[sdD] for reflog information Thomas Rast
2009-10-16 5:32 ` Jeff King
2009-10-16 8:50 ` Thomas Rast
2009-10-16 14:20 ` [PATCH v3 0/5] Pretty formats for reflog data Thomas Rast
2009-10-16 14:20 ` [PATCH v3 1/5] Refactor pretty_print_commit arguments into a struct Thomas Rast
2009-10-17 17:05 ` Junio C Hamano
2009-10-18 18:51 ` Thomas Rast
2009-10-18 22:47 ` Junio C Hamano
2009-10-19 15:48 ` Thomas Rast [this message]
2009-10-19 15:48 ` [PATCH v4 " Thomas Rast
2009-10-19 15:48 ` [PATCH v4 2/5] reflog-walk: refactor the branch@{num} formatting Thomas Rast
2009-10-19 15:48 ` [PATCH v4 3/5] Introduce new pretty formats %g[sdD] for reflog information Thomas Rast
2009-10-19 15:48 ` [PATCH v4 4/5] stash list: use new %g formats instead of sed Thomas Rast
2009-10-19 15:48 ` [PATCH v4 5/5] stash list: drop the default limit of 10 stashes Thomas Rast
2009-10-16 14:20 ` [PATCH v3 2/5] reflog-walk: refactor the branch@{num} formatting Thomas Rast
2009-10-16 14:20 ` [PATCH v3 3/5] Introduce new pretty formats %g[sdD] for reflog information Thomas Rast
2009-10-17 14:48 ` [PATCH v3.1 " Thomas Rast
2009-10-17 15:06 ` Jakub Narebski
2009-10-18 7:18 ` Jeff King
2009-10-18 10:34 ` Nanako Shiraishi
2009-10-16 14:20 ` [PATCH v3 4/5] stash list: use new %g formats instead of sed Thomas Rast
2009-10-16 14:20 ` [PATCH v3 5/5] stash list: drop the default limit of 10 stashes Thomas Rast
2009-10-17 0:50 ` [PATCH v3 0/5] Pretty formats for reflog data Junio C Hamano
2009-10-17 1:18 ` Jeff King
2009-10-15 22:41 ` [PATCH v2 4/5] stash list: use new %g formats instead of sed Thomas Rast
2009-10-15 22:41 ` [PATCH v2 5/5] stash list: drop the default limit of 10 stashes Thomas Rast
2009-10-16 5:20 ` [PATCH v2 0/5] Pretty formats for reflog data Jeff King
2009-10-16 9:00 ` Jakub Narebski
2009-10-12 21:37 ` [RFC PATCH " Jeff King
2009-10-12 21:52 ` Thomas Rast
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=cover.1255966426.git.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jefdriesen@hotmail.com \
--cc=nanako3@lavabit.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.
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).