Skip to content

Fix branch latest update on explicit remote sync - #152

Open
piyushbag wants to merge 1 commit into
EpicGames:mainfrom
piyushbag:fix/sync-explicit-remote-latest
Open

Fix branch latest update on explicit remote sync#152
piyushbag wants to merge 1 commit into
EpicGames:mainfrom
piyushbag:fix/sync-explicit-remote-latest

Conversation

@piyushbag

Copy link
Copy Markdown

Summary

Fixes branch latest pointer maintenance when lore sync <revision> --remote targets an explicit revision.

  • Propagate search_location into location for explicit revision sync so remote sync updates branch latest.
  • Use the post-sync branch (synced_branch) instead of the pre-sync branch when calling store_latest.

Fixes #122

Test plan

  • cargo +nightly fmt --all
  • cargo clippy -p lore-revision --all-targets -- -D warnings --no-deps
  • cargo test -p lore-revision sync_explicit_revision

Evidence

$ cargo test -p lore-revision sync_explicit_revision
running 1 test
test tests::sync_explicit_revision ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured

The test seeds a stale branch latest, syncs forward with --remote, and asserts the latest pointer matches the synced revision.

When sync targets an explicit revision with --remote, propagate the
remote search location into branch latest maintenance and store latest
on the post-sync branch instead of the pre-sync branch.

Fixes EpicGames#122

Signed-off-by: Piyush Jagadish Bag <piyushbag4@gmail.com>
@piyushbag
piyushbag force-pushed the fix/sync-explicit-remote-latest branch from 8825201 to 0343740 Compare July 31, 2026 00:37
@ajcarberry ajcarberry added the area:core Core library and its interfaces (lib, C API); revision, storage, transport, protocol internals label Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core Core library and its interfaces (lib, C API); revision, storage, transport, protocol internals

Development

Successfully merging this pull request may close these issues.

Bug: lore sync reports latest while the local branch remains behind remote

2 participants