Re: [PATCH v3 4/8] rebase: store orig_head as a commit
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 13, 2022, 23:25 UTC
- Message-ID
- <xmqqa65zcnmm.fsf@gitster.g>
- In-Reply-To
- <3a234ed2-5540-2109-80d7-dd48fc420841@dunelm.org.uk>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 7 quoted lines
> I was wasn't convinced that the tag dereferencing was the only > difference between lookup_commit_reference() and > lookup_commit(). lookup_commit() calls lookup_object() and if the > object is not in the parsed objects hash table it creates a new commit > object with the given oid without checking if the object > exists. lookup_commit_reference() calls parse_object() which handles > replacement objects and checks the object actually exists.
Yes, I agree that both parse_object() and lookup_commit() are needed, and the combo is preferred over lookup_commit_reference().
THanks.