projects
/
config
/
vcsh.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add submodule-update-foreach.sh and a post-pull hook for it
[config/vcsh.git]
/
.config
/
vcsh
/
hooks-available
/
sparse-checkout.sh
diff --git
a/.config/vcsh/hooks-available/sparse-checkout.sh
b/.config/vcsh/hooks-available/sparse-checkout.sh
index
b23909d
..
2ebf5a5
100755
(executable)
--- a/
.config/vcsh/hooks-available/sparse-checkout.sh
+++ b/
.config/vcsh/hooks-available/sparse-checkout.sh
@@
-1,5
+1,10
@@
#!/bin/sh
+set -e
+
+# If the vcsh repository does not exist, exit without doing anything.
+[ -d "$GIT_DIR" ] || exit 0
+
: "${XDG_CONFIG_HOME:="$HOME/.config"}"
git config core.sparseCheckout true