Skip to content

Commit fcbf595

Browse files
committed
sync/git(fix[update_repo]): Record rev-list HEAD failure in SyncResult
why: The rev_list HEAD error handler caught CommandError and returned result without calling add_error(), leaving ok=True on failure. what: - Capture exception and call result.add_error() in rev-list HEAD handler
1 parent 882593c commit fcbf595

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/libvcs/sync/git.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,9 @@ def update_repo(
432432
max_count=1,
433433
check_returncode=True,
434434
)
435-
except exc.CommandError:
435+
except exc.CommandError as e:
436436
self.log.exception("Failed to get the hash for HEAD")
437+
result.add_error("rev-list-head", str(e), exception=e)
437438
return result
438439

439440
self.log.debug("head_sha: %s", head_sha)

0 commit comments

Comments
 (0)