summaryrefslogtreecommitdiff
path: root/templates/hooks--pre-merge-commit.sample
diff options
context:
space:
mode:
authorLibravatar Phillip Wood <phillip.wood@dunelm.org.uk>2022-01-26 13:05:38 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-01-26 12:08:52 -0800
commit69f4c23009ee30faeb61a831f4265791c945783e (patch)
tree4521a6bcadf828e73d54b9e5f30c1c686a2623d2 /templates/hooks--pre-merge-commit.sample
parentt5403: refactor rebase post-checkout hook tests (diff)
downloadtgif-69f4c23009ee30faeb61a831f4265791c945783e.tar.xz
rebase: pass correct arguments to post-checkout hook
If a rebase started with "rebase [--apply|--merge] <upstream> <branch>" detects that <upstream> is an ancestor of <branch> then it fast-forwards and checks out <branch>. Unfortunately in that case it passed the null oid as the first argument to the post-checkout hook rather than the oid of HEAD. A side effect of this change is that the call to update_ref() which updates HEAD now always receives the old value of HEAD. This provides protection against another process updating HEAD during the checkout. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'templates/hooks--pre-merge-commit.sample')
0 files changed, 0 insertions, 0 deletions