From 61acd01045d49e67e47237eb387d4a5ebdde87a5 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sun, 15 Nov 2020 23:49:59 +0200 Subject: [PATCH] Cleanup the git init* scripts. The `git-Init` script created the repo on the cgit instance, but that's not a thing anymore. Replace it with the `git-initial` script which just creates a local repo and an initial empty commit. --- Documents/bin/git-Init | 4 +--- Documents/bin/git-initial | 20 -------------------- 2 files changed, 1 insertion(+), 23 deletions(-) delete mode 100755 Documents/bin/git-initial diff --git a/Documents/bin/git-Init b/Documents/bin/git-Init index 00c3fea..edb7695 100755 --- a/Documents/bin/git-Init +++ b/Documents/bin/git-Init @@ -13,10 +13,8 @@ usage () { [ "$#" = "1" ] || usage reponame="$1" # shellcheck disable=SC2029 -ssh cgit.shore.co.il "git init --bare /srv/git/$reponame" -git clone "cgit.shore.co.il:/srv/git/$reponame" +git init "$reponame" ( cd "$reponame" git commit --allow-empty --message "Initial empty commit." -git push ) diff --git a/Documents/bin/git-initial b/Documents/bin/git-initial deleted file mode 100755 index edb7695..0000000 --- a/Documents/bin/git-initial +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -set -eu - -die () { - echo "$@" - exit 1 -} - -usage () { - die "Usage: $0 repo_name" -} - -[ "$#" = "1" ] || usage -reponame="$1" -# shellcheck disable=SC2029 -git init "$reponame" -( -cd "$reponame" -git commit --allow-empty --message "Initial empty commit." -) -- GitLab