From: Jonas Fonseca Date: Tue, 7 Oct 2008 12:18:01 +0000 (+0200) Subject: Fix bug introduced in commit for using --exclude-standard flag X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=49f88913922d50488b3a9b73e5f0ad1f723396f2;p=tig.git Fix bug introduced in commit for using --exclude-standard flag Introduced in commit 33623c0022b49a5f2774b37a58726a95a4367447. The bug is reproducible when running tig status in a newly created repository. --- diff --git a/tig.c b/tig.c index 25a6d76..84ac268 100644 --- a/tig.c +++ b/tig.c @@ -4045,11 +4045,12 @@ status_open(struct view *view) system("git update-index -q --refresh >/dev/null 2>/dev/null"); - if (opt_no_head && - !status_run(view, STATUS_LIST_NO_HEAD_CMD, 'A', LINE_STAT_STAGED)) - return FALSE; - else if (!status_run(view, STATUS_DIFF_INDEX_CMD, 0, LINE_STAT_STAGED)) + if (opt_no_head) { + if (!status_run(view, STATUS_LIST_NO_HEAD_CMD, 'A', LINE_STAT_STAGED)) + return FALSE; + } else if (!status_run(view, STATUS_DIFF_INDEX_CMD, 0, LINE_STAT_STAGED)) { return FALSE; + } if (!status_run(view, STATUS_DIFF_FILES_CMD, 0, LINE_STAT_UNSTAGED) || !status_run(view, STATUS_LIST_OTHER_CMD, '?', LINE_STAT_UNTRACKED))