X-Git-Url: https://git.distorted.org.uk/~mdw/tig/blobdiff_plain/220265483d86f175a23b09407b6923e5829e800f..b1744cbe9a54bc7b62b1c5316b6e73ab95cfea12:/tig.c 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))