]> git.phdru.name Git - git-scripts.git/commitdiff
Feat: Edit `.git/description` after clone
authorOleg Broytman <phd@phdru.name>
Fri, 18 Apr 2025 21:44:34 +0000 (00:44 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 18 Apr 2025 21:44:52 +0000 (00:44 +0300)
clone
copy-scripts/copy-scripts
fork

diff --git a/clone b/clone
index 58d898c2f921c02b175778d5d67a10fa894ac278..774d6a7d48ffe996c06b7f614f26a8673cf0cee5 100755 (executable)
--- 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
index 2201c0faf5602ed96efb978f62352fa3b95d4505..83f2d4718b83fd82ce3f5a99a83f80fdf6a73228 100755 (executable)
@@ -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 7238adaca2037ecf4db99d95d362302e2ee054b2..348c5e6862918007a15184b12e7b8223e638e925 100755 (executable)
--- 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