From 49f88913922d50488b3a9b73e5f0ad1f723396f2 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Tue, 7 Oct 2008 14:18:01 +0200 Subject: [PATCH] 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. --- tig.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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)) -- 2.30.2