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

Re: [PATCH 2/2] Rebase: Run post-checkout hook on checkout

From
Orgad Shaneh <orgads@gmail.com>
Date
Dec 29, 2018, 21:31 UTC
Message-ID
<CAGHpTBK+1JxhqGDNsjY4Qevd65gSYYeVMBVpHxa0=0OrKbbrEg@mail.gmail.com>
In-Reply-To
<xmqqimzdl0v4.fsf@gitster-ct.c.googlers.com>
On Sat, Dec 29, 2018 at 12:53 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 12 quoted lines
>
> orgads@gmail.com writes:
>
> > From: Orgad Shaneh <orgads@gmail.com>
>
> > Re: [PATCH 2/2] Rebase: Run post-checkout hook on checkout
>
> There is no explanation here?
>
> Is this a regression fix (i.e. scripted version of "rebase" used to
> run the hook)?  Or a new feature (i.e. no earlier version of
> "rebase" run the hook but you think it ought to run it)?
Added an explanation.
[snip]
Show 7 quoted lines
>
> > +#define RESET_HEAD_RUN_HOOK (1<<2)
>
> Would it be plausible that the only possible hook that can be run by
> reset_head() function will always be post-checkout and nothing else,
> I wonder?  Shouldn't this bit be called *_RUN_POST_CHECKOUT to make
> sure it is specific enough?
Done
[snip]
Show 7 quoted lines
>
> > +test_expect_success 'post-checkout is triggered on rebase' '
> > +     git checkout -b rebase-test master &&
> > +     rm -f .git/post-checkout.args &&
>
> Read the title of this whole test script file; it should verify what
> is in the file before removing it.

Why? Other tests already do it. This test is meant for rebase, not plain checkout.

Show 5 quoted lines
>
> > +     git rebase rebase-on-me &&
> > +     read old new flag < .git/post-checkout.args &&
>
> No SP between "<" and ".git/post-checkout.args".
Done
Show 6 quoted lines
> > +     test $old != $new && test $flag = 1 &&
> > +     rm -f .git/post-checkout.args
> > +'
>
> Regarding the clean-up of this file, see my review on the previous
> one.
Done
> > +test_expect_success 'post-checkout is triggered on rebase with fast-forward' '
>
> The same comment as above applies to this.
Done
Thanks,
- Orgad
Previous: Junio C Hamano
Message 8 of 8 in “Rebase: Run post-checkout hook on checkout”
  1. Rebase: Run post-checkout hook on checkoutorgads@gmail.com, Dec 24, 2018
  2. 1/2 t5403: Refactororgads@gmail.com, Dec 24, 2018
  3. Junio C HamanoDec 28, 2018
  4. Ramsay JonesDec 29, 2018
  5. Orgad ShanehDec 29, 2018
  6. 2/2 Rebase: Run post-checkout hook on checkoutorgads@gmail.com, Dec 24, 2018
  7. Junio C HamanoDec 28, 2018
  8. Orgad ShanehDec 29, 2018

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.