From: Josh England Date: Wed, 26 Sep 2007 17:16:50 GMT Subject: Re: [PATCH] post-checkout hooks and related tests Message-ID: <1190827010.6078.123.camel@beauty> In-Reply-To: <7vve9y2v39.fsf@gitster.siamese.dyndns.org> On Tue, 2007-09-25 at 16:17 -0700, Junio C Hamano wrote: > "Josh England" writes: > > > 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. 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