Skip to content

Bug: branch merge cannot find common ancestor until remote revision data is explicitly cached #135

Description

@dzmitryj

Environment

  • Lore: 0.8.4+283
  • Platform: Windows
  • Current branch and its remote head were in sync
  • No tracked changes

Reproduction

From a clean branch whose history includes an earlier merge from main:

lore status --scan
lore branch info
lore branch merge main

The merge fails before calculating the three-way diff:

[Error] locating divergent source revision: no revision found
  at lore-revision\src\find.rs:30:1
  at lore-revision\src\branch\merge.rs:533 - locating divergent source revision

Both branch heads and the shared history are available remotely. Explicitly using and caching remote revision data succeeds:

lore branch merge start main --remote --cache --search-limit 1000 --no-pager

The retry finds the common base and starts the merge normally:

Revision diff base ... source ... target ...
Calculating 3-way diff

Expected behavior

lore branch merge main should locate the common ancestor when both branches and their revision history exist remotely, fetching missing revision data as needed.

If local-only operation is intended, the error should say that the local revision graph is incomplete and suggest --remote or --cache.

Actual behavior

The default command reports that no divergent revision exists even though the common ancestor is valid and immediately found when the remote graph is explicitly cached.

Workaround

lore branch merge start main --remote --cache --search-limit 1000 --no-pager

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions