From: Junio C Hamano Date: Tue, 29 Jan 2019 20:47:56 +0000 (-0800) Subject: Merge branch 'it/log-format-source' X-Git-Tag: v2.21.0-rc0~58 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/a562a119833b7202d5c9b9069d1abb40c1f9b59a?ds=inline;hp=-c Merge branch 'it/log-format-source' 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 --- a562a119833b7202d5c9b9069d1abb40c1f9b59a diff --combined builtin/log.c index 3e145fe502,9deff32b89..a479642eb9 --- a/builtin/log.c +++ b/builtin/log.c @@@ -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: