projects
/
config
/
vcsh.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
467a976
)
sparse-checkout.sh: don't do anything if the repository does not exist
author
Antonio Ospite <ao2@ao2.it>
Fri, 14 Dec 2018 15:07:20 +0000
(16:07 +0100)
committer
Antonio Ospite <ao2@ao2.it>
Mon, 17 Dec 2018 09:37:45 +0000
(10:37 +0100)
.config/vcsh/hooks-available/sparse-checkout.sh
patch
|
blob
|
history
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
#!/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
: "${XDG_CONFIG_HOME:="$HOME/.config"}"
git config core.sparseCheckout true