From 4fe7bac236d7c1895271bf15bdb9dda1253ec230 Mon Sep 17 00:00:00 2001 From: Parabola git Date: Thu, 7 Jul 2016 22:37:56 +0000 Subject: git-shell-commands: use tab --- git-shell-commands/change-description | 6 +++--- git-shell-commands/change-owner | 6 +++--- git-shell-commands/create-bare-repo | 16 ++++++++-------- git-shell-commands/delete-repo | 14 +++++++------- git-shell-commands/fetch-mirrors | 6 +++--- git-shell-commands/help | 4 ++-- git-shell-commands/mirror | 2 +- 7 files changed, 27 insertions(+), 27 deletions(-) (limited to 'git-shell-commands') diff --git a/git-shell-commands/change-description b/git-shell-commands/change-description index 1c144f4..16b7ad2 100755 --- a/git-shell-commands/change-description +++ b/git-shell-commands/change-description @@ -12,8 +12,8 @@ _repo="$(sed -r -e '/(^|\/)\.\.($|\/)/d' -e "s,[^A-Za-z0-9\./_~-],,g" <<<"$repo" test "$repo" = "$_repo" || { printf 'Illegal name: %s\n' "${repo}"; exit 1; } if test -d "$repo".git; then - echo "${*}" > "${repo}".git/description + echo "${*}" > "${repo}".git/description else - printf 'Does not exist: %s\n' "${repo}" - exit 1 + printf 'Does not exist: %s\n' "${repo}" + exit 1 fi diff --git a/git-shell-commands/change-owner b/git-shell-commands/change-owner index 562de7d..8b59388 100755 --- a/git-shell-commands/change-owner +++ b/git-shell-commands/change-owner @@ -12,8 +12,8 @@ _repo="$(sed -r -e '/(^|\/)\.\.($|\/)/d' -e "s,[^A-Za-z0-9\./_~-],,g" <<<"$repo" test "$repo" = "$_repo" || { printf 'Illegal name: %s\n' "${repo}"; exit 1; } if test -d "${repo}".git; then - git config -f "${repo}.git/config" "gitweb.owner" "${*}" + git config -f "${repo}.git/config" "gitweb.owner" "${*}" else - printf 'Does not exist: %s\n' "${repo}" - exit 1 + printf 'Does not exist: %s\n' "${repo}" + exit 1 fi 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 diff --git a/git-shell-commands/delete-repo b/git-shell-commands/delete-repo index 5ef94b1..41b1d76 100755 --- a/git-shell-commands/delete-repo +++ b/git-shell-commands/delete-repo @@ -6,12 +6,12 @@ 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 'Does not exist: %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 'Does not exist: %s\n' "${repo}"; continue; } - echo "Removing ${repo}.git" - # lo and behold absolute horror - rm -rf -- "$repo".git + echo "Removing ${repo}.git" + # lo and behold absolute horror + rm -rf -- "$repo".git done diff --git a/git-shell-commands/fetch-mirrors b/git-shell-commands/fetch-mirrors index afff064..6b7672d 100755 --- a/git-shell-commands/fetch-mirrors +++ b/git-shell-commands/fetch-mirrors @@ -7,7 +7,7 @@ set -e # Find all mirrors "$(dirname "$0")"/mirrors | while read -r mirror; do - pushd "$mirror" >/dev/null - git remote update - popd >/dev/null + pushd "$mirror" >/dev/null + git remote update + popd >/dev/null done diff --git a/git-shell-commands/help b/git-shell-commands/help index 633c152..f2970d5 100755 --- a/git-shell-commands/help +++ b/git-shell-commands/help @@ -7,6 +7,6 @@ set -e # Gets the initial comment after the shebeng from every git-shell-command for c in "$(dirname "$0")"/*; do - sed -rn '2,/^[^#]/s/^# ?//p' "$c" - echo + sed -rn '2,/^[^#]/s/^# ?//p' "$c" + echo done diff --git a/git-shell-commands/mirror b/git-shell-commands/mirror index 4b2828f..8d7a648 100755 --- a/git-shell-commands/mirror +++ b/git-shell-commands/mirror @@ -6,5 +6,5 @@ set -E for _m in "$@"; do - git clone --mirror "$_m" + git clone --mirror "$_m" done -- cgit v1.2.3