From e60e29cb6c941223768634413e7ffa13cc5b0b19 Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer <coding@lirion.de> Date: Sun, 14 Jul 2024 12:12:21 +0200 Subject: move submodule git-prompt to post-checkout --- .githooks/post-checkout | 13 +++++++++++++ .gitignore | 1 + .gitmodules | 6 ------ git-prompt | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) create mode 100755 .githooks/post-checkout diff --git a/.githooks/post-checkout b/.githooks/post-checkout new file mode 100755 index 0000000..d4bbbd7 --- /dev/null +++ b/.githooks/post-checkout @@ -0,0 +1,13 @@ +#!/usr/bin/env sh +# client-side +install -dvm 0750 .git/modules +install -dvm 0750 .git/modules/git-prompt +install -dvm 0750 .git/modules/git-prompt/info +cat > .git/modules/git-prompt/info/sparse-checkout <<EOF +contrib/completion/git-prompt.sh +EOF +rm -rf ./git-prompt +git -c submodule.sha1collisiondetection.update=none clone --depth=1 --no-checkout https://github.com/git/git.git git-prompt &&\ +git submodule add https://github.com/git/git.git git-prompt &&\ +git -C git-prompt config core.sparseCheckout true &&\ +git submodule update --force --checkout git-prompt diff --git a/.gitignore b/.gitignore index fccf319..64410c0 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ !/.ssh/config !/.ssh/config.d/0000-all.conf !/git-prompt +!/.githooks diff --git a/.gitmodules b/.gitmodules index acec308..d2a5366 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,9 +6,3 @@ path = tmux-yank url = https://github.com/tmux-plugins/tmux-yank branch = master -[submodule "git-prompt"] - path = git-prompt - url = https://github.com/git/git.git - shallow = true - sparsecheckout = true - branch = maint diff --git a/git-prompt b/git-prompt index c2b3f2b..a7dae3b 160000 --- a/git-prompt +++ b/git-prompt @@ -1 +1 @@ -Subproject commit c2b3f2b3cdbf5ad9feb978dd367d77561a1271f7 +Subproject commit a7dae3bdc8b516d36f630b12bb01e853a667e0d9 -- cgit v1.2.3