From: Antonio Ospite Date: Thu, 13 Dec 2018 15:52:16 +0000 (+0100) Subject: Fix the git terminology by always referring to the "working tree" X-Git-Url: https://git.ao2.it/config/vcsh.git/commitdiff_plain/20cf74a268166d49d162f61a4174e19016763dcb?ds=sidebyside Fix the git terminology by always referring to the "working tree" The set of files checked out by git is called the "working tree", avoid other definitions like "working directory" or "work dir". --- diff --git a/.config/vcsh/hooks-available/populate-fully.sh b/.config/vcsh/hooks-available/populate-fully.sh index 46e155f..1b2c612 100755 --- a/.config/vcsh/hooks-available/populate-fully.sh +++ b/.config/vcsh/hooks-available/populate-fully.sh @@ -2,7 +2,7 @@ set -e -# Only one vcsh instance at a time can have the work dir fully populated. +# Only one vcsh instance at a time can have the working tree fully populated. LOCKDIR=/run/lock/vcsh # Kill the parent process because vcsh does not catch the hook exit value. @@ -13,7 +13,7 @@ mkdir "$LOCKDIR" 2>/dev/null || { echo "An instance of vcsh already entered a re echo $PPID > "$LOCKDIR/pid" # git read-tree manual page says this is the proper way to fully repopulate -# the working directory +# the working tree. git config core.sparseCheckout true rm -f "$GIT_DIR/info/sparse-checkout" echo "/*" > "$GIT_DIR/info/sparse-checkout" diff --git a/.config/vcsh/hooks-available/populate-sparsely.sh b/.config/vcsh/hooks-available/populate-sparsely.sh index 755092b..387ec21 100755 --- a/.config/vcsh/hooks-available/populate-sparsely.sh +++ b/.config/vcsh/hooks-available/populate-sparsely.sh @@ -2,7 +2,7 @@ set -e -# Only the same instance of vcsh that had the work dir fully populated is +# Only the same instance of vcsh that had the working tree fully populated is # allowed to repopulate it sparsely. LOCKDIR=/run/lock/vcsh [ -d "$LOCKDIR" ] || exit 0 @@ -15,5 +15,5 @@ LOCKPID=$(cat "$LOCKDIR/pid") . "$XDG_CONFIG_HOME/vcsh/hooks-available/sparse-checkout.sh" git read-tree -mu HEAD -# Unlock the work dir. +# Unlock the working tree. rm -rf "$LOCKDIR" diff --git a/README b/README index 93010e2..c862f7d 100644 --- a/README +++ b/README @@ -8,9 +8,9 @@ a pre-upgrade hook is used to make vcsh repositories use it. Many git commands (e.g. git-merge, git-checkout) will automatically use the information in $GIT_DIR/info/sparse-checkout when dealing with files in the -git work directory, so generally a calling git-read-tree explicitly is not +git working tree, so generally a calling git-read-tree explicitly is not needed. However when the content of $GIT_DIR/info/sparse-checkout changes it is necessary to call "git read-tree -mu HEAD" to update the content of the -working directory. +working tree.