MCPcopy Create free account
hub / github.com/libgit2/pygit2 / update_ref2

Function update_ref2

test/test_transaction.py:161–170  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159 errors.append(('thread1', str(e)))
160
161 def update_ref2() -> None:
162 try:
163 with testrepo.transaction() as txn:
164 txn.lock_ref(ref2_name)
165 thread2_ref2_locked.set()
166 thread1_ref1_locked.wait(timeout=5)
167 txn.set_target(ref2_name, target1, message='Thread 2 update')
168 results.append('thread2_success')
169 except Exception as e:
170 errors.append(('thread2', str(e)))
171
172 thread1 = threading.Thread(target=update_ref1)
173 thread2 = threading.Thread(target=update_ref2)

Callers

nothing calls this directly

Calls 3

transactionMethod · 0.80
lock_refMethod · 0.80
set_targetMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…