summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2022-10-17 13:17:41 +0000
committerJunio C Hamano <gitster@pobox.com>2022-10-17 11:53:03 -0700
commitf21becdd94d17ae792b951cf784898324bedfda5 (patch)
tree85d65195c641eb2186d6056a521afa5a4ce05af1 /commit.c
parentb8dbfd030ccc8e5be6b22bc28a342119504e0c2b (diff)
rebase: store orig_head as a commit
Using a struct commit rather than a struct oid to hold orig_head means that we error out straight away if the branch being rebased does not point to a commit. It also simplifies the code that handles finding the merge base and fork point as it no longer has to convert from an oid to a commit. To avoid changing the behavior of "git rebase <upstream> <branch>" we keep the existing call to read_ref() and use lookup_commit_object() on the oid returned by that rather than calling lookup_commit_reference_by_name() which applies the ref dwim rules to its argument. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions