aboutsummaryrefslogtreecommitdiffstats
path: root/git2redcrew.sh
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2024-07-19 10:37:40 +0200
committerMatěj Cepl <mcepl@cepl.eu>2024-07-19 10:37:40 +0200
commit87058593da899b45198a8ed5ba78264fd62abfb5 (patch)
treed16a0e3c81b053ec32f8a84dd487bf301ffadb96 /git2redcrew.sh
parentf6a4ab6cf64b5a77686f5b4dbbdda11f1f771b17 (diff)
downloadhlupak-87058593da899b45198a8ed5ba78264fd62abfb5.tar.gz
fix(git2redcrew): .git doesn't have to a directory
Script should work even with checked out submodules.
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 964e6e1..142acd7 100755
--- a/git2redcrew.sh
+++ b/git2redcrew.sh
@@ -29,7 +29,7 @@ done
# Shift past the last option parsed by getopts
shift $((OPTIND-1))
-if [ -d .git ] ; then
+if [ -e .git ] ; then
git gc --aggressive --prune=now
REPO="$(basename "$(git rev-parse --show-toplevel)")"
cd ..