author | Junio C Hamano <gitster@pobox.com> | |
Sun, 16 Nov 2008 08:48:59 +0000 (00:48 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 16 Nov 2008 08:48:59 +0000 (00:48 -0800) |
* jk/commit-v-strip:
status: show "-v" diff even for initial commit
wt-status: refactor initial commit printing
define empty tree sha1 as a macro
status: show "-v" diff even for initial commit
wt-status: refactor initial commit printing
define empty tree sha1 as a macro
1 | 2 | |||
---|---|---|---|---|
cache.h | patch | | diff1 | | diff2 | | blob | history |
sha1_file.c | patch | | diff1 | | diff2 | | blob | history |
wt-status.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc cache.h
Simple merge
diff --cc sha1_file.c
Simple merge
diff --cc wt-status.c
index 6a7645ed86fd5879e959460011a8add015d392d9,ec91fba601bab8a6e9545952cf08a0a544c8107d..3edae43ce9d99b27ed69166d90db71bc3c219404
--- 1/wt-status.c
--- 2/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;
+ DIFF_OPT_SET(&rev.diffopt, ALLOW_TEXTCONV);
rev.diffopt.file = s->fp;
rev.diffopt.close_file = 0;
+ /*
+ * If we're not going to stdout, then we definitely don't
+ * want color, since we are going to the commit message
+ * file (and even the "auto" setting won't work, since it
+ * will have checked isatty on stdout).
+ */
+ if (s->fp != stdout)
+ DIFF_OPT_CLR(&rev.diffopt, COLOR_DIFF);
run_diff_index(&rev, 1);
}