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

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

From
JEJosh England <jjengla@sandia.gov>
Date
Sep 25, 2007, 16:41 UTC
Message-ID
<1190738473.6078.102.camel@beauty>
In-Reply-To
<7vfy138vql.fsf@gitster.siamese.dyndns.org>
On Mon, 2007-09-24 at 16:54 -0700, Junio C Hamano wrote:
Show 36 quoted lines
> "Josh England" <jjengla@sandia.gov> writes:
> 
> > On Mon, 2007-09-24 at 14:07 -0700, Junio C Hamano wrote:
> > ...
> >> If you want to spacial case 
> >> 
> >>         $ git checkout otherbranch path.c
> >> 
> >> it raises another issue.  Which commit should supply the
> >> "extended attribute description" for path.c?  Should it be taken
> >> from the current commit (aka HEAD), otherbranch, or the index?
> >
> > This already is a special case and your question is valid but not one
> > that git should necessary care about.  Since extended attributes are not
> > built into git the only way to handle them is through hooks.  A such, it
> > is up to the hook to worry about these kinds of issues.
> 
> The fear I have is that that kind of thinking would necessitate
> your hook to be called after the user edits paths.c in any other
> way not to confuse users.
> 
> What I am questioning is where we should stop, in order to keep
> things simpler to explain, and I happen to think that it is far
> easier if we can teach that "git checkout other path.c" is
> equivalent to "git cat-file blob other:path.c >path.c" followed
> by "git add path.c", than saying "checkout is magical and if you
> have external hook it can do far more than editing the file
> yourself to arrive at the same contents".
> 
> 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*].
> 
> I just wanted to make sure we know what semantics this is
> bringing in, and get it clearly documented.  That's all.
OK.  I'll try to come up with some good wording for the documentation.

So this leads to my next question: Should the post-merge patch be brought in under this same umbrella to form a single post-checkout hook, or should it stay a separate hook?

-JE
Previous: Andreas EricssonNext: Junio C Hamano
Message 11 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.