diff options
| author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2022-10-17 13:17:41 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-10-17 11:53:03 -0700 |
| commit | f21becdd94d17ae792b951cf784898324bedfda5 (patch) | |
| tree | 85d65195c641eb2186d6056a521afa5a4ce05af1 /commit.c | |
| parent | rebase: be stricter when reading state files containing oids (diff) | |
| download | git-f21becdd94d17ae792b951cf784898324bedfda5.tar.gz git-f21becdd94d17ae792b951cf784898324bedfda5.zip | |
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
