From 95554dc7862f770ee2ec26cc86e81f2d3fc66e52 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 23 Aug 2016 17:31:19 +1200 Subject: If HEAD not set, suppress error --- bash/bashrc.d/prompt.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bash/bashrc.d') diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index 3fc7ad13..69801b90 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -130,7 +130,7 @@ prompt() { state=${state}'!' # Changes are staged - git diff-index --cached --quiet HEAD || + git diff-index --cached --quiet HEAD 2>/dev/null || state=${state}'+' # There are some untracked and unignored files -- cgit v1.2.3