Christopher <[email protected]> writes:

> From what I understand, "fedora fork" creates a fork using my own
> account. What I want is something different. I want to add another
> user's fork as a remote to my local clone, so I can check out their
> merge request branch, and evaluate their proposed diff locally. I
> don't think the "fedora fork" command can add a remote for a different
> user's fork.

In order to check out merge requests/pull requests I add the following
line to the remote config:

        fetch = +refs/pull/*/head:refs/remotes/origin/pull/*

For example, in my .git/config, I have:

[remote "origin"]
        url = https://src.fedoraproject.org/rpms/<package>.git
        fetch = +refs/heads/*:refs/remotes/origin/*
        fetch = +refs/pull/*/head:refs/remotes/origin/pull/*

Then you can just run: git fetch origin && git checkout pull/123

That way you do not need to keep extra remotes.

-- 
Tulio Magno
-- 
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to