diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2023-07-20 15:15:40 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2023-07-20 15:15:40 -0300 |
commit | 9ca078dfc86af9c50446bceb818af7b48ce7a73e (patch) | |
tree | c35101d81d5a866db0ef198f09ee4a7567bd4ec5 | |
parent | 690975594fa4003011dedf26d2356d47bae4942e (diff) | |
download | utils-git-9ca078dfc86af9c50446bceb818af7b48ce7a73e.tar.gz utils-git-9ca078dfc86af9c50446bceb818af7b48ce7a73e.tar.bz2 |
Fix: better handling of paths with spaces
-rwxr-xr-x | commit | 8 | ||||
-rwxr-xr-x | commit-updates | 2 |
2 files changed, 5 insertions, 5 deletions
@@ -13,7 +13,7 @@ GIT="hit" # Usage: git_folder <file> function git_folder { - local folder="$1" folder folders dir_list cwd + local folder="$*" folder folders dir_list cwd if [ -d "$folder/.git" ]; then GIT_FOLDER="$folder" @@ -27,18 +27,18 @@ function git_folder { done cwd="`pwd`" - cd $folder + cd "$folder" for i in $folders; do cd .. if [ -d "$(pwd)/.git" ]; then GIT_FOLDER="$(pwd)" - cd $cwd + cd "$cwd" return fi done - cd $cwd + cd "$cwd" return 1 } diff --git a/commit-updates b/commit-updates index 9fe77d7..1ebcece 100755 --- a/commit-updates +++ b/commit-updates @@ -28,7 +28,7 @@ if $GIT status &> /dev/null; then if [ ! -z "$ARGS" ]; then commit "Updates $ARGS" else - commit "Updates $(basename `pwd`)" + commit "Updates $(basename "`pwd`")" fi else mr commit -m "Updates" |