summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2013-10-08 11:58:22 -0300
committerNicolás Reynolds <fauno@endefensadelsl.org>2013-10-08 11:58:22 -0300
commit76571cb2dc2644e9eb23758cd8da6d281d573994 (patch)
tree8486cfbcbe1e97603c49493a4da5689be14671de
parentd1bdb09e361ec4a057356d9055068c837d0005ba (diff)
Allow hidden repos
-rwxr-xr-xgit-shell-commands/create-bare-repo4
-rwxr-xr-xgit-shell-commands/delete-repo2
2 files changed, 3 insertions, 3 deletions
diff --git a/git-shell-commands/create-bare-repo b/git-shell-commands/create-bare-repo
index 7559fc3..3051c9d 100755
--- a/git-shell-commands/create-bare-repo
+++ b/git-shell-commands/create-bare-repo
@@ -6,8 +6,8 @@
set -e
for repo in $@; do
-# Cleanup names
- repo="`echo "$repo" | sed -e "s,^[/\.]\+,,g" -e "s,[^a-z0-9\./_-],,gi"`"
+# Cleanup names, allow hidden repos
+ repo="`echo "$repo" | sed -e "s/\.\.//g" -e "s,^/\+,,g" -e "s,[^a-z0-9\./_-],,gi"`"
test -d "$repo".git && continue
mkdir -p "$repo".git
diff --git a/git-shell-commands/delete-repo b/git-shell-commands/delete-repo
index 075f77a..4ca644e 100755
--- a/git-shell-commands/delete-repo
+++ b/git-shell-commands/delete-repo
@@ -7,7 +7,7 @@ set -e
for repo in $@; do
# Remove leading slashes and dots and perform cleanup
- repo="`echo "$repo" | sed -e "s,^[/\.]\+,,g" -e "s,[^a-z0-9\./_-],,gi"`"
+ repo="`echo "$repo" | sed -e "s/\.\.//g" -e "s,^/\+,,g" -e "s,[^a-z0-9\./_-],,gi"`"
test ! -d "$repo".git && continue
echo "Removing ${repo}.git"