Re: [PATCH] post-checkout hooks and related tests
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:36
"Josh England" [off-list ref] writes:
quoted hunk
diff --git a/git-checkout.sh b/git-checkout.sh index 17f4392..78355eb 100755 --- a/git-checkout.sh +++ b/git-checkout.sh@@ -137,6 +137,13 @@ Did you intend to checkout '$@' which can not be resolved as commit?" git ls-files --error-unmatch -- "$@" >/dev/null || exit git ls-files -- "$@" | git checkout-index -f -u --stdin + + # Run a post-checkout hook -- the HEAD does not change so the + # current HEAD is passed in for both args + if test -x "$GIT_DIR"/hooks/post-checkout; then
It is usually a good idea to view your patch in your MUA before sending them out. You will spot HT vs SP indentation inconsistencies right away. HEAD did not change but don't you want to differenciate if the checkout was from the index or from the HEAD? If not why not?