[Solved] Git commands and test pull request

I'm able to build all packages and images following the steps:
https://openwrt.org/docs/guide-developer/quickstart-build-images

There are some pull requests (not merged) which I would like to test: e.g:
https://github.com/openwrt/openwrt/pull/965 or
https://github.com/openwrt/packages/pull/6091
I follow the below steps(below) but probably something is missing?
https://github.com/TeamPorcupine/ProjectPorcupine/wiki/How-to-Test-a-Pull-Request
I did:

 /mnt/openwrt/OpenwrtAR71xxUSB $ git remote -v
origin  https://git.openwrt.org/openwrt/openwrt.git (fetch)
origin  https://git.openwrt.org/openwrt/openwrt.git (push)
 /mnt/openwrt/OpenwrtAR71xxUSB $ git remote add upstream https://git.openwrt.org/openwrt/openwrt.git
 /mnt/openwrt/OpenwrtAR71xxUSB $
 /mnt/openwrt/OpenwrtAR71xxUSB $
 /mnt/openwrt/OpenwrtAR71xxUSB $ git remote -v
origin  https://git.openwrt.org/openwrt/openwrt.git (fetch)
origin  https://git.openwrt.org/openwrt/openwrt.git (push)
upstream        https://git.openwrt.org/openwrt/openwrt.git (fetch)
upstream        https://git.openwrt.org/openwrt/openwrt.git (push)

/mnt/openwrt/OpenwrtAR71xxUSB $ git fetch upstream pull/6091/head:domoticz
fatal: Couldn't find remote ref pull/6091/head

git fetch upstream pull/665/head:openssl-1.1
fatal: Couldn't find remote ref pull/665/head

Can Someone help me how I should do it correctly ?

Your error is using git.openwrt.org as "upstream", as Pull Requests are specific to github.

Define upstream as https://github.com/openwrt/openwrt.git

And naturally, the packages feeds repo is quite separate, so there you need to define in feeds/packages root the upstream as https://github.com/openwrt/packages.git

1 Like

Thanks.

 /mnt/openwrt/OpenwrtAR71xxUSB $ git remote -v
origin  https://git.openwrt.org/openwrt/openwrt.git (fetch)
origin  https://git.openwrt.org/openwrt/openwrt.git (push)
upstream        https://github.com/openwrt/openwrt.git (fetch)
upstream        https://github.com/openwrt/openwrt.git (push)

 /mnt/openwrt/OpenwrtAR71xxUSB $ git fetch upstream pull/665/head:openssl-1.1
remote: Counting objects: 4, done.
remote: Total 4 (delta 2), reused 2 (delta 2), pack-reused 2
Unpacking objects: 100% (4/4), done.
From https://github.com/openwrt/openwrt
 * [new ref]         refs/pull/665/head -> openssl-1.1
 /mnt/openwrt/OpenwrtAR71xxUSB $ git remote remove upstream
 /mnt/openwrt/OpenwrtAR71xxUSB $ git remote add upstream https://github.com/openwrt/packages.git
 /mnt/openwrt/OpenwrtAR71xxUSB $ git fetch upstream pull/6091/head:domoticz
remote: Counting objects: 55955, done.
remote: Compressing objects: 100% (35/35), done.
1 Like

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.