]> gitweb.fluxo.info Git - utils-git.git/commitdiff
Updates
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 13 May 2015 15:40:54 +0000 (12:40 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 13 May 2015 15:40:54 +0000 (12:40 -0300)
commit-updates

index 571cadd980c31d1866e67bf7a23c72a40fe4294c..698af4d51bc502bd8f3255340b2ea42799d83bcd 100755 (executable)
@@ -7,8 +7,12 @@
 ARGS="$*"
 
 # Simply update commit
-if [ ! -z "$1" ]; then
-  commit "Updates $*"
+if git status &> /dev/null; then
+  if [ ! -z "$1" ]; then
+    commit "Updates $*"
+  else
+    commit "Updates $(basename `pwd`)"
+  fi
 else
-  commit "Updates $(basename `pwd`)"
+  mr commit -m "Updates"
 fi