From: Jonas Fonseca Date: Thu, 20 Mar 2008 12:21:40 +0000 (+0100) Subject: Fix index refreshing into separate call so diff-files is always run X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b1744cbe9a54bc7b62b1c5316b6e73ab95cfea12;p=tig.git Fix index refreshing into separate call so diff-files is always run --- 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))