Skip to content

Refresh the remote default branch during selector-free updates #20

Closed

Description

@LunaStev

Problem

A Git dependency without branch, tag, or rev resolves through refs/remotes/origin/HEAD. Vex fetches refs but does not refresh that symbolic ref. If the remote default branch changes, vex update continues resolving the old branch indefinitely.

Reproduction

Verified on master at 8c2d93a:

  1. Create a Git dependency whose default branch is main.
  2. Add it without a selector and run vex fetch.
  3. Create a newer next branch and change the remote HEAD to next.
  4. Confirm git ls-remote --symref <remote> HEAD reports refs/heads/next.
  5. Run vex update.
  6. Vex leaves the dependency at the old main commit because the managed checkout still has origin/HEAD -> origin/main.

Expected behavior

An explicit update of a selector-free dependency should follow the remote default branch as it exists at update time.

Acceptance criteria

  • Refresh or resolve the remote HEAD when updating a selector-free dependency.
  • Keep ordinary build, run, check, tree, and fetch operations pinned to the locked commit.
  • Support both full and targeted updates.
  • Add a local Git integration test that changes the advertised default branch.
  • Do not fetch unrelated dependencies during a targeted update.

Activity

  1. added
    bug
    dependencies
    on Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdependencies

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions