From 67993dd0c50b72f9a182ab6d5623d0bac0d166bd Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Wed, 9 May 2012 21:56:59 -0400 Subject: [PATCH] Update the index before showing staged/unstaged changes in the main view --- tig.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tig.c b/tig.c index b47cc7b..9047cd1 100644 --- a/tig.c +++ b/tig.c @@ -6863,6 +6863,8 @@ main_add_changes_commits(struct view *view, const char *parent) const char *staged_parent = NULL_ID; const char *unstaged_parent = parent; + io_run_bg(update_index_argv); + if (!main_has_changes(unstaged_argv)) { unstaged_parent = NULL; staged_parent = parent; @@ -6946,7 +6948,7 @@ main_read(struct view *view, char *line) if (is_boundary || !isalnum(*line)) line++; - if (opt_show_changes && opt_is_inside_work_tree && !view->lines) + if (!view->lines && opt_show_changes && opt_is_inside_work_tree) main_add_changes_commits(view, line); return main_add_commit(view, LINE_MAIN_COMMIT, line, is_boundary) != NULL; -- 2.11.4.GIT