]> gitweb.fluxo.info Git - utils-git.git/commitdiff
Misc fixes
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 16 Sep 2017 22:41:33 +0000 (19:41 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 16 Sep 2017 22:41:33 +0000 (19:41 -0300)
commit
commit-updates
hit

diff --git a/commit b/commit
index 0b998b024f07e54f506ca6bd7abc9be4bd9c4b99..f1396508282c6493866c75b618289931ac4b0b20 100755 (executable)
--- a/commit
+++ b/commit
@@ -139,7 +139,7 @@ function git_commit {
     flag="-a"
   fi
 
-  $GIT commit $flag -m "$params"
+  $GIT commit $flag -m "$params" || exit 1
 }
 
 # Main
index 2a71c1d83931e8d6914cd6d79ce8b55e5bc6a206..9fe77d78d1da3f9d35338e91e524a9dd0ecdddeb 100755 (executable)
@@ -11,10 +11,10 @@ GIT="hit"
 
 # Check if param is a project
 if [ ! -z "$PROJECT" ] && [ -z "$2" ] && ( cd $PROJECT &> /dev/null ); then
-  if ! git status &> /dev/null; then
+  if ! $GIT status &> /dev/null; then
     cd $PROJECT &> /dev/null
     shift
-  elif ! git status $PROJECT | grep -q "$PROJECT (new commits)"; then
+  elif ! $GIT status $PROJECT | grep -q "$PROJECT (new commits)"; then
     cd $PROJECT &> /dev/null
     shift
   fi
diff --git a/hit b/hit
index 7f242265ccabae0ad462d7dbcb62d62f331aea78..c49e69cfbf5e253e12b3bb21ad2c857e0c46c2df 100755 (executable)
--- a/hit
+++ b/hit
@@ -5,15 +5,17 @@
 # Main features:
 #
 # * Disables/mitigates hooks by changing permission and ownership on `~/.git/hooks`.
+# * Runs git through firejail if it's available.
 #
 # Other features to consider:
 #
-# * Checks proper user/email config.
-# * Automatically sets git-flow when initializing a repository.
-# * Automatically sets git-hooks integration.
-# * Implements global hooks.
-# * Checks remote configuration.
-# * Checks hook tampering before doing anything in the repository, like removing hook permissions
+# * Check proper user/email config.
+# * Automatically set git-flow when initializing a repository.
+# * Automatically set git-hooks integration.
+# * Allow hook whitelisting.
+# * Implement global hooks like using a global init.templateDir config.
+# * Check remote configuration.
+# * Check hook tampering before doing anything in the repository, like removing hook permissions.
 
 # Parameters
 BASENAME="`basename $0`"
@@ -53,4 +55,5 @@ fi
 #
 # Call git
 #
-$GIT $*
+# https://stackoverflow.com/questions/1668649/how-to-keep-quotes-in-args/1669548#1669548
+$GIT "$@"