Wireshark-dev: Re: [Wireshark-dev] Wiki: Backporting A Change To A Release Branch

From: chuck c <bubbasnmp@xxxxxxxxx>
Date: Mon, 26 Sep 2022 15:36:16 -0500
Thanks! In theory I followed the instructions in the WSDG but that was several years ago now.

In case anyone else hits this in the future:
wireshark$ git checkout -b github_4_0_qt6 upstream/release-4.0
fatal: 'upstream/release-4.0' is not a commit and a branch 'github_4_0_qt6' cannot be created from it

wireshark$ git fetch upstream release-4.0
Enter passphrase for key '/xxx/.ssh/id_ed25519':
remote: Enumerating objects: 691, done.
remote: Counting objects: 100% (550/550), done.
remote: Compressing objects: 100% (85/85), done.
remote: Total 691 (delta 468), reused 529 (delta 464), pack-reused 141
Receiving objects: 100% (691/691), 2.79 MiB | 1.03 MiB/s, done.
Resolving deltas: 100% (503/503), completed with 176 local objects.
From gitlab.com:wireshark/wireshark
 * branch                  release-4.0 -> FETCH_HEAD
 * [new branch]            release-4.0 -> upstream/release-4.0

wireshark$ git checkout -b github_4_0_qt6 upstream/release-4.0
Updating files: 100% (363/363), done.
Switched to a new branch 'github_4_0_qt6'
Branch 'github_4_0_qt6' set up to track remote branch 'release-4.0' from 'upstream'.

wireshark$ git branch -r -l | grep -i upstream
  upstream/master
  upstream/release-4.0

wireshark$ git status
On branch github_4_0_qt6
Your branch is up to date with 'upstream/release-4.0'.

nothing to commit, working tree clean
wireshark$


On Mon, Sep 26, 2022 at 3:18 PM Gerald Combs <gerald@xxxxxxxxxxxxx> wrote:
Did you clone your repository with `--single-branch`? If so you might need to run `git fetch upstream release-4.0`.

On 9/26/22 1:00 PM, chuck c wrote:
> wireshark$ git remote -v
> downstream      git@xxxxxxxxxx:chuckcraft/wireshark.git (fetch)
> downstream      git@xxxxxxxxxx:chuckcraft/wireshark.git (push)
> upstream        git@xxxxxxxxxx:wireshark/wireshark.git (fetch)
> upstream        git@xxxxxxxxxx:wireshark/wireshark.git (push)
>
> wireshark$ git branch -r -l | grep -i upstream
>    upstream/master
>
> wireshark$ git checkout -b github_4_0_qt6 upstream/release-4.0
> fatal: 'upstream/release-4.0' is not a commit and a branch 'github_4_0_qt6' cannot be created from it
>
> (link to the wiki page the original email referenced: https://wiki.wireshark.org/Development/SubmittingPatches#backporting-a-change-to-a-release-branch <https://wiki.wireshark.org/Development/SubmittingPatches#backporting-a-change-to-a-release-branch>)
>
> On Mon, Sep 26, 2022 at 2:43 PM Jaap Keuter <jaap.keuter@xxxxxxxxx <mailto:jaap.keuter@xxxxxxxxx>> wrote:
>
>     Hi,
>
>     Yes, the text is still relevant, in case you’re looking to back port a change from master to release-X.Y.
>
>     What you’re seem to be looking at is making a change in release-4.0 only.
>     So, checkout release-4.0 first. Then create a branch from that and put your change on there and push that.
>
>     Regards,
>     Jaap
>
>
>>     On 26 Sep 2022, at 00:52, chuck c <bubbasnmp@xxxxxxxxx <mailto:bubbasnmp@xxxxxxxxx>> wrote:
>>
>>     Is this section of the Wiki still accurate?
>>
>>     (substituting  "release-4.0" for "master-X.Y"
>>
>>     "Create and checkout a new branch with a name related to the type of change (e.g. the bug number you're fixing or the dissector you're working on):
>>       git checkout -b my-branch-name upstream/master-X.Y
>>     where "master-X.Y" is the release branch to which to backport the change.
>>
>>     This creates a branch named "my-branch-name" based on the master-X.Y branch in the official repository."
>>
>>     Or how best to make a change to:
>>     https://gitlab.com/wireshark/wireshark/-/blob/release-4.0/.github/workflows/windows.yml <https://gitlab.com/wireshark/wireshark/-/blob/release-4.0/.github/workflows/windows.yml>
>>     that doesn't apply to master.
>>
>>     thanks
>>     chuckc
>>     ___________________________________________________________________________
>>     Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx <mailto:wireshark-dev@xxxxxxxxxxxxx>>
>>     Archives: https://www.wireshark.org/lists/wireshark-dev <https://www.wireshark.org/lists/wireshark-dev>
>>     Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev <https://www.wireshark.org/mailman/options/wireshark-dev>
>>     mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe <mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe>
>
>     ___________________________________________________________________________
>     Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx <mailto:wireshark-dev@xxxxxxxxxxxxx>>
>     Archives: https://www.wireshark.org/lists/wireshark-dev <https://www.wireshark.org/lists/wireshark-dev>
>     Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev <https://www.wireshark.org/mailman/options/wireshark-dev>
>                   mailto:wireshark-dev-request@xxxxxxxxxxxxx <mailto:wireshark-dev-request@xxxxxxxxxxxxx>?subject=unsubscribe
>
>
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives:    https://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
>               mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe