Thread (119 messages) 119 messages, 6 authors, 3d ago

Re: [PATCH v2 5/9] reset: introduce ability to skip reference updates

From: Patrick Steinhardt <hidden>
Date: 2026-06-04 09:02:03

On Thu, Jun 04, 2026 at 08:51:47AM +0900, Junio C Hamano wrote:
Patrick Steinhardt [off-list ref] writes:
quoted
@@ -112,6 +113,9 @@ int reset_head(struct repository *r, const struct reset_head_opts *opts)
 	if (opts->branch_msg && !opts->branch)
 		BUG("branch reflog message given without a branch");
 
+	if (skip_ref_updates && (opts->branch || refs_only))
+		BUG("asked to perform ref updates and skip them at the same time");
;-)  That's certainly a careful safety valve.

Would we also want to catch skip_ref_updates && update_orig_head
being both set as a bogus request?
Yeah, I think that's a good idea.

Patrick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help