summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 827aaa0)
raw | patch | inline | side by side (parent: 827aaa0)
author | Jonas Fonseca <fonseca@diku.dk> | |
Fri, 4 Jun 2010 22:55:01 +0000 (18:55 -0400) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Fri, 4 Jun 2010 22:55:01 +0000 (18:55 -0400) |
tig.c | patch | blob | history |
index 209be27f0d06fbc7a45c71a81ac555edc2d590fe..3e4d369063259d67589aabae0c8a8a47d871148a 100644 (file)
--- a/tig.c
+++ b/tig.c
return REQ_NONE;
case REQ_ENTER:
- if (branch->ref == &branch_all) {
- const char *all_branches_argv[] = {
- "git", "log", "--no-color", "--pretty=raw", "--parents",
- "--topo-order", "--all", NULL
- };
- struct view *main_view = VIEW(REQ_VIEW_MAIN);
+ {
+ const struct ref *ref = branch->ref;
+ const char *all_branches_argv[] = {
+ "git", "log", "--no-color", "--pretty=raw", "--parents",
+ "--topo-order",
+ ref == &branch_all ? "--all" : ref->name, NULL
+ };
+ struct view *main_view = VIEW(REQ_VIEW_MAIN);
- if (!prepare_update(main_view, all_branches_argv, NULL)) {
- report("Failed to load view of all branches");
- return REQ_NONE;
- }
+ if (!prepare_update(main_view, all_branches_argv, NULL))
+ report("Failed to load view of all branches");
+ else
open_view(view, REQ_VIEW_MAIN, OPEN_PREPARED | OPEN_SPLIT);
- } else {
- open_view(view, REQ_VIEW_MAIN, OPEN_SPLIT);
- }
return REQ_NONE;
-
+ }
default:
return request;
}