]> git.ipfire.org Git - thirdparty/git.git/commit
reset: allow the caller to specify the current HEAD object
authorPatrick Steinhardt <ps@pks.im>
Wed, 3 Jun 2026 16:14:05 +0000 (18:14 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 4 Jun 2026 00:04:26 +0000 (09:04 +0900)
commit7192525ea4696fb98d52a5d1f5edee4b9c169bb4
treeb22695140aad8236e5a83353983f8f9c321666f1
parent8825305623e90e012f86e8d490f519565ae7ef14
reset: allow the caller to specify the current HEAD object

When calling `reset_head()` we automatically derive the commit that the
callers wants to move from by reading the HEAD commit. Some callers may
already have resolved it, or they may want to move from a different
commit that doesn't match HEAD.

Introduce a new `oid_from` option that lets the caller specify the
commit.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
reset.c
reset.h