]> git.99rst.org Git - git.git/commit
reset: allow the caller to specify the current HEAD object
authorPatrick Steinhardt <redacted>
Wed, 1 Jul 2026 11:35:34 +0000 (13:35 +0200)
committerJunio C Hamano <redacted>
Fri, 3 Jul 2026 17:32:47 +0000 (10:32 -0700)
commit1280e92d1622484c97facb840f2788166171d460
tree8a8139830b52cfd99c8165dd948ffb5ee4ae0165
parentb2ebb7803bafb581649de1b51eb3184ab7fe3463
reset: allow the caller to specify the current HEAD object

When calling `reset_working_tree()` 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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
reset.c
reset.h
git clone https://git.99rst.org/PROJECT