Merge branch 'it/log-format-source'
authorJunio C Hamano <gitster@pobox.com>
Tue, 29 Jan 2019 20:47:56 +0000 (12:47 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 29 Jan 2019 20:47:57 +0000 (12:47 -0800)
Custom userformat "log --format" learned %S atom that stands for
the tip the traversal reached the commit from, i.e. --source.

* it/log-format-source:
log: add %S option (like --source) to log --format

1  2 
builtin/log.c
diff --combined builtin/log.c
index 3e145fe5023638bc50c05f9d9dedfd6d11ae536d,9deff32b89a2c5ec9290f5bba355b0ad8b4a69d6..a479642eb98681d54a3dd802e2245ea672f2e9df
@@@ -203,7 -203,7 +203,7 @@@ static void cmd_log_init_finish(int arg
            rev->diffopt.filter || rev->diffopt.flags.follow_renames)
                rev->always_show_header = 0;
  
-       if (source) {
+       if (source || w.source) {
                init_revision_sources(&revision_sources);
                rev->sources = &revision_sources;
        }
@@@ -641,9 -641,8 +641,9 @@@ int cmd_show(int argc, const char **arg
                                        diff_get_color_opt(&rev.diffopt, DIFF_COMMIT),
                                        name,
                                        diff_get_color_opt(&rev.diffopt, DIFF_RESET));
 -                      read_tree_recursive((struct tree *)o, "", 0, 0, &match_all,
 -                                      show_tree_object, rev.diffopt.file);
 +                      read_tree_recursive(the_repository, (struct tree *)o, "",
 +                                          0, 0, &match_all, show_tree_object,
 +                                          rev.diffopt.file);
                        rev.shown_one = 1;
                        break;
                case OBJ_COMMIT: