]> gitweb.fluxo.info Git - utils-git.git/commitdiff
Updates utils-git
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 3 Jun 2017 02:16:30 +0000 (23:16 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 3 Jun 2017 02:16:30 +0000 (23:16 -0300)
commit-updates

index ab56b2ed0f4ded550594a36a6c4d79a44f99ab04..a70d3c98d19131f4bb9c9279dc433b21af8362a7 100755 (executable)
@@ -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