summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4deca32)
raw | patch | inline | side by side (parent: 4deca32)
author | Jeff King <peff@peff.net> | |
Wed, 12 Nov 2008 08:23:37 +0000 (03:23 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 12 Nov 2008 21:55:17 +0000 (13:55 -0800) |
Since we can use the same "diff against empty tree" trick as
we do for the non-initial case, it is trivial to make this
work.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
we do for the non-initial case, it is trivial to make this
work.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7507-commit-verbose.sh | patch | blob | history | |
wt-status.c | patch | blob | history |
index 519adba80b4e5bc23a68c4bdcae607cf2d403c23..da5bd3b5a585667dad97481df27049f0aa7415eb 100755 (executable)
git commit -F message
'
-test_expect_failure 'initial commit shows verbose diff' '
+test_expect_success 'initial commit shows verbose diff' '
git commit --amend -v
'
diff --git a/wt-status.c b/wt-status.c
index cb1fc48079463a47b3d46ccc2096e9d450c39fdd..ec91fba601bab8a6e9545952cf08a0a544c8107d 100644 (file)
--- a/wt-status.c
+++ b/wt-status.c
struct rev_info rev;
init_revisions(&rev, NULL);
- setup_revisions(0, NULL, &rev, s->reference);
+ setup_revisions(0, NULL, &rev,
+ s->is_initial ? EMPTY_TREE_SHA1_HEX : s->reference);
rev.diffopt.output_format |= DIFF_FORMAT_PATCH;
rev.diffopt.detect_rename = 1;
rev.diffopt.file = s->fp;
else if (s->commitable)
fprintf(s->fp, "# Untracked files not listed (use -u option to show untracked files)\n");
- if (s->verbose && !s->is_initial)
+ if (s->verbose)
wt_status_print_verbose(s);
if (!s->commitable) {
if (s->amend)