From: Jonas Fonseca Date: Mon, 17 Mar 2008 13:58:51 +0000 (+0100) Subject: Refresh the index when opening the status view to avoid "empty diffs" X-Git-Tag: tig-0.10.1~8 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/tig/commitdiff_plain/c630ef12f388ecb40834d9b4456ce80fc499dedf?ds=inline Refresh the index when opening the status view to avoid "empty diffs" --- diff --git a/tig.c b/tig.c index 8f78697..71ddbb5 100644 --- a/tig.c +++ b/tig.c @@ -3324,7 +3324,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 diff-files -z" +#define STATUS_DIFF_FILES_CMD "git update-index -q --refresh && git diff-files -z" #define STATUS_LIST_OTHER_CMD \ "git ls-files -z --others --exclude-per-directory=.gitignore"