From 5198586d56bb790d37e7aa1202e99c1219753088 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 29 Aug 2009 20:34:21 +0200 Subject: Moved git-specific logic from pkg_status to vcs_status --- bin/ct | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bin/ct') diff --git a/bin/ct b/bin/ct index 721259e..a5ff803 100755 --- a/bin/ct +++ b/bin/ct @@ -331,8 +331,11 @@ function vcs_push ( ) function vcs_status ( + typeset gitstatus vcs_setup $1 - git status + gitstatus=$(git status) + [[ $gitstatus == *'nothing to commit (working directory clean)' ]] && gitstatus='' + echo $gitstatus ) ## List stuff @@ -754,7 +757,7 @@ function pkg_status { typeset vcs_status check_installed $1 vcs_status=$(PAGER='' vcs_status $1) - if [[ -n $vcs_status && $vcs_status != *'nothing to commit (working directory clean)' ]] { + if [[ -n $vcs_status ]] { if ((SILENT)) { echo $1 } else { -- cgit v1.2.3