author | Junio C Hamano <gitster@pobox.com> | |
Thu, 26 Mar 2009 07:28:22 +0000 (00:28 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 26 Mar 2009 07:28:22 +0000 (00:28 -0700) |
* jc/maint-1.6.0-blame-s:
blame: read custom grafts given by -S before calling setup_revisions()
Conflicts:
builtin-blame.c
blame: read custom grafts given by -S before calling setup_revisions()
Conflicts:
builtin-blame.c
1 | 2 | |||
---|---|---|---|---|
builtin-blame.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc builtin-blame.c
index 2aedd17c39fdfa12b72551d61af559f534dd65a7,0c241a9ec803a95ff85cf98f2714c74a6503b976..83141fc84e22ad4852f255fa1ad453cc125a3255
--- 1/builtin-blame.c
--- 2/builtin-blame.c
+++ b/builtin-blame.c
parse_done:
argc = parse_options_end(&ctx);
+ if (revs_file && read_ancestry(revs_file))
+ die("reading graft file %s failed: %s",
+ revs_file, strerror(errno));
+
+ if (cmd_is_annotate) {
+ output_option |= OUTPUT_ANNOTATE_COMPAT;
+ blame_date_mode = DATE_ISO8601;
+ } else {
+ blame_date_mode = revs.date_mode;
+ }
+
+ /* The maximum width used to show the dates */
+ switch (blame_date_mode) {
+ case DATE_RFC2822:
+ blame_date_width = sizeof("Thu, 19 Oct 2006 16:00:04 -0700");
+ break;
+ case DATE_ISO8601:
+ blame_date_width = sizeof("2006-10-19 16:00:04 -0700");
+ break;
+ case DATE_RAW:
+ blame_date_width = sizeof("1161298804 -0700");
+ break;
+ case DATE_SHORT:
+ blame_date_width = sizeof("2006-10-19");
+ break;
+ case DATE_RELATIVE:
+ /* "normal" is used as the fallback for "relative" */
+ case DATE_LOCAL:
+ case DATE_NORMAL:
+ blame_date_width = sizeof("Thu Oct 19 16:00:04 2006 -0700");
+ break;
+ }
+ blame_date_width -= 1; /* strip the null */
+
if (DIFF_OPT_TST(&revs.diffopt, FIND_COPIES_HARDER))
opt |= (PICKAXE_BLAME_COPY | PICKAXE_BLAME_MOVE |
PICKAXE_BLAME_COPY_HARDER);
sb.ent = ent;
sb.path = path;
- if (revs_file && read_ancestry(revs_file))
- die("reading graft file %s failed: %s",
- revs_file, strerror(errno));
-
- read_mailmap(&mailmap, ".mailmap", NULL);
+ read_mailmap(&mailmap, NULL);
if (!incremental)
setup_pager();