diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2022-01-26 13:05:38 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-01-26 12:08:52 -0800 |
commit | 69f4c23009ee30faeb61a831f4265791c945783e (patch) | |
tree | 4521a6bcadf828e73d54b9e5f30c1c686a2623d2 /fsck.h | |
parent | t5403: refactor rebase post-checkout hook tests (diff) | |
download | tgif-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 'fsck.h')
0 files changed, 0 insertions, 0 deletions