Commit b9b14a4
committed
sync/git(fix[update_repo]) Disambiguate rev-list for local refs matching paths
why: When a git repo has a local branch whose name matches a directory
(e.g. branch "notes" + directory "notes/"), git rev-list fails with
"fatal: ambiguous argument". The error was caught but not recorded in
SyncResult, so vcspull reported the sync as successful despite the
visible fatal error.
what:
- Check show_ref output for refs/heads/<tag> before calling rev-list
- Use fully-qualified refs/heads/ path when available, avoiding the
ambiguity entirely (no fatal error emitted, no retry needed)
- Fall back to bare tag name when no refs/heads/ match exists (e.g.
tags, SHAs, or refs not yet fetched)1 parent 24453fe commit b9b14a4
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
470 | 480 | | |
471 | 481 | | |
472 | 482 | | |
473 | | - | |
| 483 | + | |
474 | 484 | | |
475 | 485 | | |
476 | 486 | | |
| |||
0 commit comments