aboutsummaryrefslogtreecommitdiffstats
path: root/git2redcrew.sh
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2024-07-19 10:39:54 +0200
committerMatěj Cepl <mcepl@cepl.eu>2024-07-19 10:39:54 +0200
commit814caf298e06d40b40134c7b1cdf4a5cf2c927c7 (patch)
treeeb1c7660f55671dee4207442de6ee18979644e31 /git2redcrew.sh
parent87058593da899b45198a8ed5ba78264fd62abfb5 (diff)
downloadhlupak-814caf298e06d40b40134c7b1cdf4a5cf2c927c7.tar.gz
fix(git2redcrew): don't break on set -u
We cannot do `[ -n "$1" ]` when `$1` has not been defined at all.
Diffstat (limited to 'git2redcrew.sh')
-rwxr-xr-xgit2redcrew.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git2redcrew.sh b/git2redcrew.sh
index 142acd7..d4a8b60 100755
--- a/git2redcrew.sh
+++ b/git2redcrew.sh
@@ -34,7 +34,7 @@ if [ -e .git ] ; then
REPO="$(basename "$(git rev-parse --show-toplevel)")"
cd ..
else
- [ -n "$1" ] || exit 1
+ [ "$#" -gt 0 ] || exit 1
REPO="$1"
(cd "$REPO"
git gc --aggressive --prune=now