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

Re: [PATCH] post-checkout hook, and related docs and tests

From
Andreas Ericsson <ae@op5.se>
Date
Sep 25, 2007, 04:42 UTC
Message-ID
<46F891A4.9070407@op5.se>
In-Reply-To
<7vfy138vql.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
Show 10 quoted lines
> "Josh England" <jjengla@sandia.gov> writes:
> 
> But I am obviously not the one who is interested in tracking
> extended attributes attached to git contents, and I do not feel
> too strongly about one way or the other.  I am Ok with it if you
> think "checkout is magical" is easier to teach [*1*].
> 
> [Footnote]
> 
> *1* I actually suspect this might be the case.

I think so too, if nothing else than for the simple reason than that the hook is called 'post-checkout', so the explanation is likely to go something like 'the checkout program activates it after having updated the worktree'.

Show 8 quoted lines
> I consider that
> per-path checkout from a commit is just a fancy and handy way to
> edit individual files but that probably comes from knowing how
> git works too much and I lost my git virginity too long ago.  A
> pure "user" who types "git checkout commit path" may actively
> expect "checkout" command to do something more magical than
> simply updating the index and the work tree files to a random
> state that happens to match the state recorded in one commit.

Like, run the post-checkout hook? I should think it wouldn't be too hard to believe it will.

I imagine the people using this feature will be either git-fanatics that use it for everything and only in their own environment, or sysadmins that get a handy tool for managing config in a corporate environment. I wouldn't be surprised if those sysadmins weren't all too keen on learning the 1001 ways there is to create a file from a special revision in git (and personally I only knew about 2 of the 4 you listed), so for them there'll most likely *only* be git-checkout to edit the work-tree.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Junio C HamanoNext: Josh England
Message 10 of 16 in “post-checkout hook, and related docs and tests”
  1. post-checkout hook, and related docs and testsroot, Sep 21, 2007
  2. Josh EnglandSep 21, 2007
  3. Junio C HamanoSep 22, 2007
  4. Josh EnglandSep 24, 2007
  5. Junio C HamanoSep 24, 2007
  6. Josh EnglandSep 24, 2007
  7. Junio C HamanoSep 24, 2007
  8. Josh EnglandSep 24, 2007
  9. Junio C HamanoSep 24, 2007
  10. Andreas EricssonSep 25, 2007
  11. Josh EnglandSep 25, 2007
  12. Junio C HamanoSep 25, 2007
  13. Josh EnglandSep 25, 2007
  14. Dmitry PotapovSep 26, 2007
  15. Josh EnglandSep 26, 2007
  16. Josh EnglandSep 24, 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.