Skip to content

🐞 Unexpected behavior when referencing a git fork as a Directory arg #10208

Closed

Description

@nipuna-perera

What is the issue?

I am seeing a strange behavior when using a forked repo as a ref. When I point a Directory arg to git fork, it sets the origin to upstream instead of the fork. Even if I explicitly tell it to use my default branch like github.com/private_org/repo.git#main it points to github.com/upstream_org/repo.git.

but,

If I use a branch other than default, it sets the right remote github.com/private_org/repo.git#custom_branch works.

Dagger version

dagger v0.18.3

Steps to reproduce

Use a forked git repo as a Directory parameter and either reference the default branch or no branch.

Observe that git remote -v returns the upstream as origin and not the fork.

Log output

No response

Activity

  1. jedevc commented on Apr 23, 2025

    @jedevc
    Contributor

    Ah. I think this is a caching issue - if the branch on both removes points to the same commit, it's going to get re-used.

    This is one of the things that should be resolved by #9980.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions