From 7eaf9264771a0f74b3ab378cf2e43a75b87f7d6e Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Tue, 30 Sep 2008 16:21:42 +0200 Subject: [PATCH] Main: use --topo-order when arguments are given on the command line --- NEWS | 2 ++ tig.c | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 59274da..3699097 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ tig master Improvements: - Checkout files with unstaged changes. Bound to '!' by default. + - Main: use --topo-order also when rev-list arguments are given on the + command line. tig-0.12 -------- diff --git a/tig.c b/tig.c index 7831536..26cd2ef 100644 --- a/tig.c +++ b/tig.c @@ -126,8 +126,11 @@ static bool prompt_yesno(const char *prompt); #define TIG_LOG_CMD \ "git log --no-color --cc --stat -n100 %s 2>/dev/null" +#define TIG_MAIN_BASE \ + "git log --no-color --pretty=raw --parents --topo-order" + #define TIG_MAIN_CMD \ - "git log --no-color --topo-order --parents --pretty=raw %s 2>/dev/null" + TIG_MAIN_BASE " %s 2>/dev/null" #define TIG_TREE_CMD \ "git ls-tree %s %s" @@ -524,7 +527,7 @@ parse_options(int argc, char *argv[]) if (!subcommand) /* XXX: This is vulnerable to the user overriding * options required for the main view parser. */ - string_copy(opt_cmd, "git log --no-color --pretty=raw --parents"); + string_copy(opt_cmd, TIG_MAIN_BASE); else string_format(opt_cmd, "git %s", subcommand); -- 2.30.2