hooks: factor out an update-working-tree.sh script
[config/vcsh.git] / .config / vcsh / hooks-available / populate-sparsely.sh
index 53d2b3a..cca8218 100755 (executable)
@@ -15,8 +15,12 @@ LOCKPID=$(cat "$LOCKDIR/pid")
 [ "$LOCKPID" = $PPID ] || { echo "Repository entered from another vcsh instance. Aborting." 1>&2; exit 1; }
 
 : "${XDG_CONFIG_HOME:="$HOME/.config"}"
-. "$XDG_CONFIG_HOME/vcsh/hooks-available/sparse-checkout.sh"
-git read-tree -mu HEAD
+
+# shellcheck source=/dev/null
+. "$XDG_CONFIG_HOME/vcsh/hooks-available/enable-sparse-checkout.sh"
+
+# shellcheck source=/dev/null
+. "$XDG_CONFIG_HOME/vcsh/hooks-available/update-working-tree.sh"
 
 # Unlock the working tree.
 rm -rf "$LOCKDIR"