From: Oleg Broytman Date: Fri, 18 Apr 2025 21:44:34 +0000 (+0300) Subject: Feat: Edit `.git/description` after clone X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=d39c494cdaeeafee05e88d0e52bc071b910ad8d4;p=git-scripts.git Feat: Edit `.git/description` after clone --- diff --git a/clone b/clone index 58d898c..774d6a7 100755 --- a/clone +++ b/clone @@ -21,7 +21,8 @@ fi && "`dirname \"$0\"`"/set-commit-date-recursive && pwd >> "`dirname \"$0\"`"/locate-all.list && -branch="`git rev-parse --abbrev-ref HEAD`" +branch="`git rev-parse --abbrev-ref HEAD`" && +`git var GIT_EDITOR` .git/description && git config push.default current && exec git gc --aggressive diff --git a/copy-scripts/copy-scripts b/copy-scripts/copy-scripts index 2201c0f..83f2d47 100755 --- a/copy-scripts/copy-scripts +++ b/copy-scripts/copy-scripts @@ -12,9 +12,20 @@ remote_host="$1" remote_dir="$2" remote_name="$3" -ssh "$remote_host" "cd $remote_dir && exec git init --bare git-scripts.git" && +ssh "$remote_host" " + cd $remote_dir && + git init --bare git-scripts.git + cd git-scripts.git && + echo Small git scripts >.git/description +" && + git remote add "$remote_name" "$remote_host:$remote_dir/git-scripts.git" && git push "$remote_name" master && -exec ssh "$remote_host" "cd $remote_dir && git clone git-scripts.git && - cd git-scripts.git/hooks && - exec ln -s ../../git-scripts/copy-scripts/post-update" + +exec ssh "$remote_host" " + cd $remote_dir && + git clone git-scripts.git && + cd git-scripts && + echo Small git scripts >.git/description && + cd ../git-scripts.git/hooks && + exec ln -s ../../git-scripts/copy-scripts/post-update" diff --git a/fork b/fork index 7238ada..348c5e6 100755 --- a/fork +++ b/fork @@ -38,4 +38,5 @@ git config branch.$branch.remotepush origin && git config branch.$branch.merge refs/heads/$branch && git config push.default current && +`git var GIT_EDITOR` .git/description && exec git gc --aggressive