Thread (18 messages) 18 messages, 6 authors, 2025-06-03

Re: [PATCH v3 6/8] refs: implement partial reference transaction support

From: Karthik Nayak <hidden>
Date: 2025-03-07 21:05:06

Possibly related (same subject, not in this thread)

Junio C Hamano [off-list ref] writes:
Jeff King [off-list ref] writes:
quoted
On Wed, Mar 05, 2025 at 06:39:01PM +0100, Karthik Nayak wrote:
quoted
@@ -1456,6 +1471,13 @@ static enum ref_transaction_error write_with_updates(struct packed_ref_store *re
 					    update->refname,
 					    oid_to_hex(&update->old_oid));
 				return REF_TRANSACTION_ERROR_NONEXISTENT_REF;
+
+				if (ref_transaction_maybe_set_rejected(transaction, i, ret)) {
+					strbuf_setlen(err, 0);
+					ret = 0;
+					continue;
+				}
+
 				goto error;
 			}
 		}
This new code isn't reachable, since we return in the lines shown in the
diff context.

Should it have been "ret = REF_TRANSACTION_ERROR"... in the first place?
I think the "goto error" was already unreachable, so possibly the error
is in an earlier patch. (I didn't look; Coverity flagged this in the
final state in 'jch').
Sorry about that.  It shows that I lack the bandwidth necessary to
go through fine toothed comb on all the topics I queue.  Perhaps I
should be more selective and queue only the ones I personally had
enough bandwidth to look over (or have seen clear "I looked each and
every line of this series with fine toothed comb, put reviewed-by:
me" messages sent by trusted reviewers) while ignoring others?

I dunno.

Thanks.
Apologies, I see that this was also present in the previous version.
Definitely a miss on my side. I'll see how it was missed in the tests
and add one if necessary!

Thanks!

Attachments

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