5 # Only the same instance of vcsh that had the working tree fully populated is
6 # allowed to repopulate it sparsely.
8 [ -d "$LOCKDIR" ] || exit 0
10 LOCKPID=$(cat "$LOCKDIR/pid")
11 # Use the parent pid because the hooks are launched as children of vcsh.
12 [ "$LOCKPID" = $PPID ] || { echo "Repository entered from another vcsh instance. Aborting." 1>&2; exit 1; }
14 : "${XDG_CONFIG_HOME:="$HOME/.config"}"
15 . "$XDG_CONFIG_HOME/vcsh/hooks-available/sparse-checkout.sh"
16 git read-tree -mu HEAD
18 # Unlock the working tree.