summaryrefslogtreecommitdiff
path: root/git-shell-commands/create-bare-repo
diff options
context:
space:
mode:
authorParabola git <git@parabola.nu>2016-07-07 22:37:56 +0000
committerParabola git <git@parabola.nu>2016-07-07 22:37:56 +0000
commit4fe7bac236d7c1895271bf15bdb9dda1253ec230 (patch)
treee8f927d4e4a439c1cdfc617d845e736606f02ad9 /git-shell-commands/create-bare-repo
parentc9ce5eaac72b867b2de97378f1708a035a9e9bf6 (diff)
git-shell-commands: use tab
Diffstat (limited to 'git-shell-commands/create-bare-repo')
-rwxr-xr-xgit-shell-commands/create-bare-repo16
1 files changed, 8 insertions, 8 deletions
diff --git a/git-shell-commands/create-bare-repo b/git-shell-commands/create-bare-repo
index b4d2d5f..817ac1b 100755
--- a/git-shell-commands/create-bare-repo
+++ b/git-shell-commands/create-bare-repo
@@ -6,13 +6,13 @@
set -e
for repo in "$@"; do
- repo="$(sed -r 's,^/*,,' <<<"$repo")"
- _repo="$(sed -r -e '/(^|\/)\.\.($|\/)/d' -e "s,[^A-Za-z0-9\./_~-],,g" <<<"$repo")"
- test "$repo" != "$_repo" && { printf 'Illegal name: %s\n' "${repo}"; continue; }
- test -d "$repo".git && { printf 'Already exists: %s\n' "${repo}"; continue; }
+ repo="$(sed -r 's,^/*,,' <<<"$repo")"
+ _repo="$(sed -r -e '/(^|\/)\.\.($|\/)/d' -e "s,[^A-Za-z0-9\./_~-],,g" <<<"$repo")"
+ test "$repo" != "$_repo" && { printf 'Illegal name: %s\n' "${repo}"; continue; }
+ test -d "$repo".git && { printf 'Already exists: %s\n' "${repo}"; continue; }
- mkdir -p -- "$repo".git
- pushd "$repo".git >/dev/null
- git init --bare
- popd >/dev/null
+ mkdir -p -- "$repo".git
+ pushd "$repo".git >/dev/null
+ git init --bare
+ popd >/dev/null
done