]> git.99rst.org Git - git.git/commit
reset: introduce ability to skip updating HEAD
authorPatrick Steinhardt <redacted>
Wed, 1 Jul 2026 11:35:33 +0000 (13:35 +0200)
committerJunio C Hamano <redacted>
Fri, 3 Jul 2026 17:32:33 +0000 (10:32 -0700)
commitb2ebb7803bafb581649de1b51eb3184ab7fe3463
tree9ef93a0ba5425b3d317e0ae07e95adba282621a2
parent8e435d99b56e8c7be32d7f46101d18e88b9fc4ac
reset: introduce ability to skip updating HEAD

In a subsequent commit we'll introduce a new caller to
`reset_working_tree()` that really only wants to update the index and
working tree, without updating any references. Introduce a new flag that
makes the caller opt in to updating HEAD and adapt all callers to set
that flag.

Note that in a previous iteration we instead introduced a flag that made
callers opt out of updating any references. This was somewhat awkward
though because we already have the `UPDATE_ORIG_HEAD` flag, so the
result was somewhat inconsistent.

Suggested-by: Phillip Wood <redacted>
Signed-off-by: Patrick Steinhardt <redacted>
[jc: fixed-up a typo pointed out by Christian]
Signed-off-by: Junio C Hamano <redacted>
builtin/rebase.c
reset.c
reset.h
sequencer.c
git clone https://git.99rst.org/PROJECT