Code

IO API: unify tree view and the default path in begin_update
authorJonas Fonseca <fonseca@diku.dk>
Sat, 10 Jan 2009 21:51:54 +0000 (16:51 -0500)
committerJonas Fonseca <fonseca@diku.dk>
Tue, 13 Jan 2009 21:55:18 +0000 (22:55 +0100)
tig.c

diff --git a/tig.c b/tig.c
index 858f93028c3ee38d871fc03e041afabcabb866d6..0e70d01e9527e9881293e8f2445cd3efc0cdf621 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -2545,17 +2545,13 @@ begin_update(struct view *view, bool refresh)
                if (!start_io(&view->io))
                        return FALSE;
 
-       } else if (view == VIEW(REQ_VIEW_TREE)) {
-               if (strcmp(view->vid, view->id))
+       } else {
+               if (view == VIEW(REQ_VIEW_TREE) && strcmp(view->vid, view->id))
                        opt_path[0] = 0;
 
                if (!run_io_rd(&view->io, view->ops->argv, FORMAT_ALL))
                        return FALSE;
 
-       } else {
-               if (!run_io_rd(&view->io, view->ops->argv, FORMAT_ALL))
-                       return FALSE;
-
                /* Put the current ref_* value to the view title ref
                 * member. This is needed by the blob view. Most other
                 * views sets it automatically after loading because the