From 71f1fe09120681fe8c33d866a0483ed13ea37cd1 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 1 Oct 2009 17:17:18 +0200 Subject: [Funcs] manages added files in an empty git repository --- 01_Functions.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '01_Functions.zsh') diff --git a/01_Functions.zsh b/01_Functions.zsh index 983f5c0..de4aa2d 100644 --- a/01_Functions.zsh +++ b/01_Functions.zsh @@ -187,7 +187,11 @@ get_git_status () elif [ "$not_up_to_date" != "" ] ; then my_git_status="$git_colors[not_up_to_date]" elif [ "$(git-cat-file -t HEAD 2>/dev/null)" != "commit" ] ; then - my_git_status="$git_colors[init_in_progress]" + if [ ! -z "$(git-ls-files)" ] ; then + my_git_status="$git_colors[cached]" + else + my_git_status="$git_colors[init_in_progress]" + fi else my_git_status="$git_colors[up_to_date]" fi -- cgit v1.2.3