How do I merge a pull request with trunk

I wish to help test the latest version of a pull request for the Lantiq platform. I build openwrt regularly but always vanilla Trunk.

After I do a git pull to bring trunk up to date, I need to merge/rebase this:

Thanks in anticipation!

One option:

git pull --no-edit --rebase origin pull/15233/head

Another option:

wget https://patch-diff.githubusercontent.com/raw/openwrt/packages/pull/15233.patch
git am -3 --ignore-whitespace 15233.patch

@darksky,

Thank you for your assistance, however neither approach worked:

Blockquote

paul@paul-Latitude-E5420:~/openwrt$
paul@paul-Latitude-E5420:~/openwrt$
paul@paul-Latitude-E5420:~/openwrt$ git pull --no-edit --rebase origin pull/15233/head
fatal: couldn't find remote ref pull/15233/head
paul@paul-Latitude-E5420:~/openwrt$
paul@paul-Latitude-E5420:~/openwrt$ wget https://patch-diff.githubusercontent.com/raw/openwrt/packages/pull/15233.patch
--2024-05-09 08:14:15-- https://patch-diff.githubusercontent.com/raw/openwrt/packages/pull/15233.patch
Resolving patch-diff.githubusercontent.com (patch-diff.githubusercontent.com)... 4.208.26.197
Connecting to patch-diff.githubusercontent.com (patch-diff.githubusercontent.com)|4.208.26.197|:443... connected.
HTTP request sent, awaiting response... 302 Found
Cookie coming from patch-diff.githubusercontent.com attempted to set domain to github.com
Location: https://github.com/openwrt/packages/pull/15233.patch [following]
--2024-05-09 08:14:16-- https://github.com/openwrt/packages/pull/15233.patch
Resolving github.com (github.com)... 4.208.26.197
Connecting to github.com (github.com)|4.208.26.197|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/openwrt/packages/issues/15233 [following]
--2024-05-09 08:14:16-- https://github.com/openwrt/packages/issues/15233
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘15233.patch.1’

15233.patch.1 [ <=> ] 180.59K --.-KB/s in 0.1s

2024-05-09 08:14:17 (1.26 MB/s) - ‘15233.patch.1’ saved [184927]

paul@paul-Latitude-E5420:~/openwrt$ git pull --no-edit --rebase origin pull/15233/head
fatal: couldn't find remote ref pull/15233/head
paul@paul-Latitude-E5420:~/openwrt$

Blockquote

It’s clear Option 1 failed, and you then proceeded to Option 2 and wget pulled down the patch 15233.patch.1.

Question is why did you retry Option 1 instead of continuing with option 2 and just applying the patch with git am -3 --ignore-whitespace 15233.patch.1

Mea cupla. This is what actually happens.....

paul@paul-Latitude-E5420:/openwrt$ wget https://patch-diff.githubusercontent.com/raw/openwrt/packages/pull/15233.patch
--2024-05-09 11:51:34-- https://patch-diff.githubusercontent.com/raw/openwrt/packages/pull/15233.patch
Resolving patch-diff.githubusercontent.com (patch-diff.githubusercontent.com)... 4.208.26.197
Connecting to patch-diff.githubusercontent.com (patch-diff.githubusercontent.com)|4.208.26.197|:443... connected.
HTTP request sent, awaiting response... 302 Found
Cookie coming from patch-diff.githubusercontent.com attempted to set domain to github.com
Location: https://github.com/openwrt/packages/pull/15233.patch [following]
--2024-05-09 11:51:35-- https://github.com/openwrt/packages/pull/15233.patch
Resolving github.com (github.com)... 4.208.26.197
Connecting to github.com (github.com)|4.208.26.197|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/openwrt/packages/issues/15233 [following]
--2024-05-09 11:51:35-- https://github.com/openwrt/packages/issues/15233
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘15233.patch’

15233.patch [ <=> ] 180.57K 1.03MB/s in 0.2s

2024-05-09 11:51:36 (1.03 MB/s) - ‘15233.patch’ saved [184908]

paul@paul-Latitude-E5420:/openwrt$ git am -3 --ignore-whitespace 15233.patch
Patch is empty.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To record the empty patch as an empty commit, run "git am --allow-empty".
To restore the original branch and stop patching, run "git am --abort".
paul@paul-Latitude-E5420:/openwrt$

Thanks agin

Another, old school. ignoring the git-fu:

wget https://github.com/openwrt/openwrt/pull/15233.patch
patch -p1 < 15233.patch
1 Like

@anomeome

Perfect!

I am building the testing kernel version now.

Very many thanks to you all!

1 Like