aboutsummaryrefslogtreecommitdiff
path: root/commit
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2023-07-20 15:15:40 -0300
committerSilvio Rhatto <rhatto@riseup.net>2023-07-20 15:15:40 -0300
commit9ca078dfc86af9c50446bceb818af7b48ce7a73e (patch)
treec35101d81d5a866db0ef198f09ee4a7567bd4ec5 /commit
parent690975594fa4003011dedf26d2356d47bae4942e (diff)
downloadutils-git-HEAD.tar.gz
utils-git-HEAD.tar.bz2
Fix: better handling of paths with spacesHEADmaster
Diffstat (limited to 'commit')
-rwxr-xr-xcommit8
1 files changed, 4 insertions, 4 deletions
diff --git a/commit b/commit
index fe2ade6..d16fc81 100755
--- a/commit
+++ b/commit
@@ -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
}