Code

Fix 'tig show <commit>' fix which causes empty tree views
authorJonas Fonseca <fonseca@diku.dk>
Tue, 21 Sep 2010 12:38:11 +0000 (08:38 -0400)
committerJonas Fonseca <fonseca@diku.dk>
Tue, 21 Sep 2010 12:43:03 +0000 (08:43 -0400)
NEWS
tig.c

diff --git a/NEWS b/NEWS
index a9cbe076932048fa8120650e911664f9b09f15b2..210a8472e97c31e4dd8be515904b63c36f0bb468 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ tig master
 
 Bug fixes:
 
+ - Fix regression causing empty tree view.
  - Fix set_tabsize() compile error for older versions of ncurses.
 
 tig-0.16.1
diff --git a/tig.c b/tig.c
index 01b55d74b81994856e3da0cf779e52c97a36615e..37a779cadea5d7abc85a55d8d40de453e1db9683 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -3332,7 +3332,7 @@ static bool
 prepare_io(struct view *view, const char *dir, const char *argv[], bool replace)
 {
        view->dir = dir;
-       return format_argv(&view->argv, argv, replace, !view->parent);
+       return format_argv(&view->argv, argv, replace, !view->prev);
 }
 
 static bool