git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] post-checkout hooks and related tests

From
JEJosh England <jjengla@sandia.gov>
Date
Sep 26, 2007, 17:16 UTC
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:
Show 19 quoted lines
> "Josh England" <jjengla@sandia.gov> 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
Previous: Junio C Hamano
Message 6 of 6 in “post-checkout hooks and related tests”
  1. post-checkout hooks and related testsJosh England, Sep 25, 2007
  2. post-merge hook and related testsJosh England, Sep 25, 2007
  3. Documentation for post-checkout and post-merge hooksJosh England, Sep 25, 2007
  4. Junio C HamanoSep 25, 2007
  5. Junio C HamanoSep 25, 2007
  6. Josh EnglandSep 26, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.