From b1744cbe9a54bc7b62b1c5316b6e73ab95cfea12 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Thu, 20 Mar 2008 13:21:40 +0100 Subject: [PATCH] Fix index refreshing into separate call so diff-files is always run --- tig.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tig.c b/tig.c index 1ae0a1e..73aa991 100644 --- a/tig.c +++ b/tig.c @@ -3356,7 +3356,7 @@ error_out: /* Don't show unmerged entries in the staged section. */ #define STATUS_DIFF_INDEX_CMD "git diff-index -z --diff-filter=ACDMRTXB --cached -M HEAD" -#define STATUS_DIFF_FILES_CMD "git update-index -q --refresh && git diff-files -z" +#define STATUS_DIFF_FILES_CMD "git diff-files -z" #define STATUS_LIST_OTHER_CMD \ "git ls-files -z --others --exclude-per-directory=.gitignore" @@ -3400,6 +3400,8 @@ status_open(struct view *view) return FALSE; } + system("git update-index -q --refresh"); + if (!status_run(view, STATUS_DIFF_INDEX_CMD, TRUE, LINE_STAT_STAGED) || !status_run(view, STATUS_DIFF_FILES_CMD, TRUE, LINE_STAT_UNSTAGED) || !status_run(view, cmd, FALSE, LINE_STAT_UNTRACKED)) -- 2.32.0.93.g670b81a890