git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git rebase backend change: post-checkout hook is not ran by 'merge' backend
@ 2020-04-02 15:57 Philippe Blain
  2020-04-02 16:00 ` Philippe Blain
  2020-04-02 16:58 ` Elijah Newren
  0 siblings, 2 replies; 4+ messages in thread
From: Philippe Blain @ 2020-04-02 15:57 UTC (permalink / raw)
  To: git; +Cc: Elijah Newren

Hello,

I'm not sure if this has been reported yet (couldn't find it), 
but I noticed a behavioral difference between the merge 
and apply backends that is not mentioned in the documentation:
The 'apply' backend will run the post-checkout hook just after 
moving HEAD to the commit we are rebasing onto; 
this does not happen with the merge backend:

    $ echo "echo \"Running post-checkout hook\"" > .git/hooks/post-checkout
    $ git checkout -b <branch1> <commit2>
    $ git rebase upstream/master --apply
    First, rewinding head to replay your work on top of it...
    Running post-checkout hook
    Applying: <commit1>
    Applying: <commit2>
    $ git checkout -b <branch2> <commit2>
    Successfully rebased and updated refs/heads/<branch2>

Cheers,
Philippe.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-03  9:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-02 15:57 git rebase backend change: post-checkout hook is not ran by 'merge' backend Philippe Blain
2020-04-02 16:00 ` Philippe Blain
2020-04-02 16:58 ` Elijah Newren
2020-04-03  9:08   ` Phillip Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).