Re: [PATCH] post-checkout hooks and related tests
From: Josh England <hidden>
Date: 2016-06-15 22:43:36
On Tue, 2007-09-25 at 16:17 -0700, Junio C Hamano wrote:
"Josh England" [off-list ref] writes:quoted
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; thenIt 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.
Dang. It looked ok in emacs. :(
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?
Hmmmm. It wouldn't hurt to add another arg though I guess in case someone might use it. I'm just trying to figure out how to word this nicely in the Documentation. -JE