git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Philippe Blain <levraiphilippeblain@gmail.com>
To: git <git@vger.kernel.org>
Cc: Elijah Newren <newren@gmail.com>
Subject: git rebase backend change: post-checkout hook is not ran by 'merge' backend
Date: Thu, 2 Apr 2020 11:57:28 -0400	[thread overview]
Message-ID: <9945492E-1D97-4741-B999-F30CA561D4DE@gmail.com> (raw)

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.

             reply	other threads:[~2020-04-02 15:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-02 15:57 Philippe Blain [this message]
2020-04-02 16:00 ` git rebase backend change: post-checkout hook is not ran by 'merge' backend Philippe Blain
2020-04-02 16:58 ` Elijah Newren
2020-04-03  9:08   ` Phillip Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9945492E-1D97-4741-B999-F30CA561D4DE@gmail.com \
    --to=levraiphilippeblain@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).