From bfefcf85fed4075594372c43dc14d139120bbf88 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 2 Jun 2017 23:16:30 -0300 Subject: Updates utils-git --- commit-updates | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'commit-updates') diff --git a/commit-updates b/commit-updates index ab56b2e..a70d3c9 100755 --- a/commit-updates +++ b/commit-updates @@ -8,8 +8,10 @@ PROJECT="$1" # Check if param is a project if [ ! -z "$PROJECT" ] && [ -z "$2" ] && ( cd $PROJECT &> /dev/null ); then - cd $PROJECT &> /dev/null - shift + if ! git status $PROJECT | grep -q "$PROJECT (new commits)"; then + cd $PROJECT &> /dev/null + shift + fi fi # Commit message -- cgit v1.2.3