Plumb TargetHEAD through Result/ProbeResult/bridge

Commit

Soph4mo ago

syncer.Result and syncer.ProbeResult re-gain the TargetHEAD field. internalbridge.ProbeResult.TargetHEAD and ExecutionSummary.TargetHEAD expose it to library callers / JSON output. Human Lines() emit a "target-head: <ref>" line when populated.

All Result construction sites (sync, replicate, bootstrap wrapper) pick up s.target.headTarget. ProbeResult does the same in the s.target != nil branch.

Together with the previous commit's upload-pack discovery, callers can now see both sides of the HEAD picture and decide what to do — git-sync still doesn't actively propagate HEAD over the wire (no go-git symref-update support yet), but the field-equality check is enough for a CLI script or downstream tool to detect a default-branch mismatch.

Refs #45.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com Entire-Checkpoint: 0b4edbe8a55f

Checkpoints

does git-sync handle any ref or just branches

Claude CodeOpus 4.7[1m]
View session
Checkpoint 1