summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f1fe753)
raw | patch | inline | side by side (parent: f1fe753)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 19 Sep 2010 15:09:41 +0000 (11:09 -0400) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 19 Sep 2010 15:09:41 +0000 (11:09 -0400) |
NEWS | patch | blob | history | |
tig.c | patch | blob | history |
index e06467576bf23cc0e6b67614a000eaac9d4b0700..583592df1aa39671c87d1cea3f8ffeb88055d66c 100644 (file)
--- a/NEWS
+++ b/NEWS
Bug fixes:
+ - Fix 'tig show <commit>' to show the provided commit.
- Fix problem with empty diff views when file specs were passed on the
command line.
- Fix segfault when starting tig in pager mode.
index e0e812c605128f15d40c104d8ba1373c51ff3a0e..7bc5daaaeeb440018bcb7642e42af11c66ea63ad 100644 (file)
--- a/tig.c
+++ b/tig.c
}
static bool
-format_argv(const char ***dst_argv, const char *src_argv[], bool replace)
+format_argv(const char ***dst_argv, const char *src_argv[], bool replace, bool first)
{
char buf[SIZEOF_STR];
int argc;
break;
continue;
- } else if (!strcmp(arg, "%(revargs)")) {
+ } else if (!strcmp(arg, "%(revargs)") ||
+ (first && !strcmp(arg, "%(commit)"))) {
if (!argv_append_array(dst_argv, opt_rev_args))
break;
continue;
prepare_io(struct view *view, const char *dir, const char *argv[], bool replace)
{
view->dir = dir;
- return format_argv(&view->argv, argv, replace);
+ return format_argv(&view->argv, argv, replace, !view->parent);
}
static bool
return;
}
- if (format_argv(&argv, req->argv, TRUE))
+ if (format_argv(&argv, req->argv, TRUE, FALSE))
open_external_viewer(argv, NULL);
if (argv)
argv_free(argv);