git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. P. <coding _æ_ lirion.de> 2024-07-14 13:10:23 +0200
committerH. P. <coding _æ_ lirion.de> 2024-07-14 13:10:23 +0200
commit429003c91aadba10e2447fab2a536d21cb1a334c (patch)
tree14ab55be0d772e727c142a76ecb339e881b8ffd3
parent3d3d8bf1736400f064dc25213bc38ea1f902ed25 (diff)
downloaddotfiles-429003c91aadba10e2447fab2a536d21cb1a334c.tar.bz2
solution in readme
-rw-r--r--README.md28
1 files changed, 8 insertions, 20 deletions
diff --git a/README.md b/README.md
index d383517..e660979 100644
--- a/README.md
+++ b/README.md
@@ -8,28 +8,14 @@ Parts are old, parts are not done yet, we're getting there.
## only clone git-prompt.sh
-Define your git hooksPath. If `git config --global core.hooksPath` delivers no result, choose a directory
-where to place your hooks. I am going with `git config --global core.hooksPath '~/git-hooks'` (the quotation
-marks are essential here, otherwise `~` would be converted to a static home directory name).
+This repository does not include a git-prompt.sh source. This is due to the file residing inside
+the whole git repository. Submoduling cannot just include one file, so if you need this file here,
+the checkout is... up to you, kind of.
-Inside that folder, place a file with following content:
+Since I am maintaining this repo for ease of distribution for myself as well, here's the solution:
-```
-#!/usr/bin/env sh
-
-if git remote get-url origin --no-all | grep -P 'lirion.*dotfiles(.git)?$' > /dev/null; then
- install -dvm .git/modules
- install -dvm .git/modules/git-prompt
- install -dvm .git/modules/git-prompt/info
- cat > .git/modules/git-prompt/info/sparse-checkout <<EOF
-contrib/completion/git-prompt.sh
-EOF
- rm -r ./git-prompt
- git -c submodule.sha1collisiondetection.update=none submodule update --init --recursive
-fi
-```
-
-Then you can proceed to clone.
+Trigger `/.githooks/post-checkout` inside this repo. Either do this on any checkout, or set your git
+post-checkout trigger for this file to automatically take over.
## sha1collisiondetection
@@ -43,3 +29,5 @@ For git-prompt, its submodule sha1collisiondetection may be "broken" (i.e. it ca
clone --recurse-submodules
submodule update --init --recursive
```
+
+This only applies if you do not use `/.githooks/post-checkout` inside this repository.