summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2ec706e)
Rename the sparse-checkout.sh script to enable-sparse-checkout.sh to
better illustrate what the script actually does.
In particular the new name should communicate that the script does not
update the working tree itself but it just enable sparse checkout
support, leaving the working tree update to other git commands
(read-tree, checkout, etc.).
--- /dev/null
+#!/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
+rm -f "$GIT_DIR/info/sparse-checkout"
+ln -s "$XDG_CONFIG_HOME/vcsh/sparse-checkout" "$GIT_DIR/info/sparse-checkout"
: "${XDG_CONFIG_HOME:="$HOME/.config"}"
# shellcheck source=/dev/null
: "${XDG_CONFIG_HOME:="$HOME/.config"}"
# shellcheck source=/dev/null
-. "$XDG_CONFIG_HOME/vcsh/hooks-available/sparse-checkout.sh"
+. "$XDG_CONFIG_HOME/vcsh/hooks-available/enable-sparse-checkout.sh"
# Verify if the current branch is valid before updating the working tree.
# This avoids errors with empty repositories which would only confuse the
# Verify if the current branch is valid before updating the working tree.
# This avoids errors with empty repositories which would only confuse the
+++ /dev/null
-#!/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
-rm -f "$GIT_DIR/info/sparse-checkout"
-ln -s "$XDG_CONFIG_HOME/vcsh/sparse-checkout" "$GIT_DIR/info/sparse-checkout"
-../hooks-available/sparse-checkout.sh
\ No newline at end of file
+../hooks-available/enable-sparse-checkout.sh
\ No newline at end of file