From nobody Fri Dec 2 12:08:56 2022 X-Original-To: freebsd-git@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NNsDg6xNjz4jHLy for ; Fri, 2 Dec 2022 12:09:07 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NNsDg64d9z4NZd; Fri, 2 Dec 2022 12:09:07 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669982947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HO6PI15fW0hEXdzRLcYMnWfphOZ34ihZjyWqTrpGg/w=; b=GUCCFPDFxbf3MbwiyeaS/LuIk+IgJb4I6lb0x8+WT5p66YxEE9T/gT+JZxEPXwun0VzgKJ PigRxpxtgk0x7HmkQeyEFEdqE+VskrhE33DvimJacb2fq7mQaq904f9uMAFuUamSN+Cefj OBRF9Z9bWHyoqc5Q+Pe1izVrKGv6mz2ZpH/j5FDmfk5WBnMbrOyOPuKbPoUsKhDtjrGFBD DRPz5d1MhS+msztMS1xEIYoHxDM/ZGmpYUwJSVZOi+ZAKXRruIZz80w0pjGEoWDp/OtCjZ wMn9p5djoRfpFErmE5lnADwyWMrz5PuHIGTGH9d9oMt94RsL9AtYcpIFk2LJCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669982947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HO6PI15fW0hEXdzRLcYMnWfphOZ34ihZjyWqTrpGg/w=; b=gsUvPfvi6pjLUGL93j6SQ4PtpBUCTmVCjizPaaqOzU4ewbs35VNKVY6hyP0kjBEvBkhGEl XO3PbzOhQOv1qgBmzYnUotjE5ugRGKtQnX5c3eIwpkXeXP3CMZTnav+XfSk9ee18u9YcXb kTr97fmTVaGZfMJaDza2e6owmvaHf3BSMnSzd3GSOfQpUd4H/BK4Z2GxA82Fry7pyAGil4 +YBq5YozRbT9fwem2AByZ9+4Z63T+hD03tSPXYfmKV9pi/MSh8ZQmJWRpcfBiIHGGvJyfb 8StyVl8vDFpggHlFbZQ30kgmUrRG5l67oxbGRXB0L8kLPw0sci5lksT+z/n7vw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669982947; a=rsa-sha256; cv=none; b=QB+mci4qXknagG8Jx5KR3UKyc4NhQNLaIQQxanpuXOeJ04P2HImFrtFx5yfPf7oxxYTtfd sLk8UoAdJ5ob8AOWDHny2J3sTT6AWid0vjI7rPP3yGxOMgnrflTal94dHs2D/tJbVhb8oi w17ADGNvIQO5F6ThaZZVcz9tcGQW14UOkqza0meh6rIlrE8590GqMZ4I5Is3GdiqHPmMtn 09o52mbZnxJPVuy2EhEjr2tNLoyXhs5v2BE8RdbQTqfe2Mcl6LqYobsWgjxeZ1Sm7fQAK/ vQpiykTYku8O55wmzBwzEC/DYIro7w3nzbrYtxJKDuYGTuFJ18l5xLANS3EiRw== Received: from mail-vs1-f52.google.com (mail-vs1-f52.google.com [209.85.217.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4NNsDg57T0zbMy; Fri, 2 Dec 2022 12:09:07 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-vs1-f52.google.com with SMTP id t10so4243883vsa.5; Fri, 02 Dec 2022 04:09:07 -0800 (PST) X-Gm-Message-State: ANoB5pl0Qzt6yh4WWoxoLbb995e800HdcyUpaWKtkKwJjmfuWS7GNJxu si/diy4WLB1ap/ZLE+AloryGMHmh94bS75cQiXc= X-Google-Smtp-Source: AA0mqf7WF5wURca55rKbFHLb5YKspwtlVuWcdb9wjlRoqlx0a4DhRhYropfqAHD+Dr73RZ30w0B1YjCXvNQNd8AKSG8= X-Received: by 2002:a67:ed94:0:b0:3aa:8846:b9a with SMTP id d20-20020a67ed94000000b003aa88460b9amr29225800vsp.58.1669982947333; Fri, 02 Dec 2022 04:09:07 -0800 (PST) List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Nuno Teixeira Date: Fri, 2 Dec 2022 12:08:56 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git-switch(1) then git-pull(1) To: Graham Perrin Cc: freebsd-git@freebsd.org Content-Type: multipart/alternative; boundary="0000000000005b62e405eed73412" X-ThisMailContainsUnwantedMimeParts: N --0000000000005b62e405eed73412 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Not sure if I understand but I use `git switch` on ports tree to switch from 'main' to 'quarterly' to avoid having 2 trees. e.g. When in main and need to do a commit on 2022Q4: `git switch 2022Q4` `git pull --rebase` `git cherry-pick -x XXX` `git push` and switch back to main: `git switch -` or `git switch main` `git pull --rebase` Hope that helps Graham Perrin escreveu no dia sexta, 2/12/2022 =C3=A0(s) 08:04: > I'm confused. > > If a switch is intended to update things, then how can an immediately > subsequent pull lead to updates? > > > % git -C /usr/ports switch main && git -C /usr/src switch main > Already on 'main' > Your branch is up to date with 'freebsd/main'. > M sys/netgraph/bluetooth/hci/ng_hci_cmds.c > M sys/netgraph/bluetooth/hci/ng_hci_evnt.c > M sys/netgraph/bluetooth/include/ng_hci.h > Already on 'main' > Your branch is up to date with 'origin/main'. > % git -C /usr/ports pull --ff-only && git -C /usr/src pull --ff-only > remote: Enumerating objects: 3284, done. > remote: Counting objects: 100% (840/840), done. > remote: Compressing objects: 100% (3/3), done. > remote: Total 3284 (delta 837), reused 837 (delta 837), pack-reused 2444 > Receiving objects: 100% (3284/3284), 1.92 MiB | 1.11 MiB/s, done. > Resolving deltas: 100% (1985/1985), completed with 474 local objects. > From https://git.freebsd.org/ports > fb6a9af3e898..80afc63eeb99 main -> freebsd/main > 749ca3ec2e60..c3552efe398e 2022Q4 -> freebsd/2022Q4 > Updating fb6a9af3e898..80afc63eeb99 > ^C > % cat /usr/ports/.git/config > [core] > repositoryformatversion =3D 0 > filemode =3D true > bare =3D false > logallrefupdates =3D true > [remote "freebsd"] > url =3D https://git.freebsd.org/ports.git > fetch =3D +refs/heads/*:refs/remotes/freebsd/* > [branch "main"] > remote =3D freebsd > merge =3D refs/heads/main > % > > Git - git-switch Documentation > --=20 Nuno Teixeira FreeBSD Committer (ports) --0000000000005b62e405eed73412 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Not sure if I understand but I use `git switch` on po= rts tree to switch from 'main' to 'quarterly' to avoid havi= ng 2 trees.

e.g.
When in main and need t= o do a commit on 2022Q4:
`git switch 2022Q4`
`git pull = --rebase`
`git cherry-pick -x XXX`
`git push`

and switch back to main:
`git switch -` or `git s= witch main`
`git pull --rebase`

Hope tha= t helps



Graham Perrin <grahamperrin@freebsd.org> escreveu= no dia sexta, 2/12/2022 =C3=A0(s) 08:04:
=20 =20 =20

I'm confused.

If a switch is intended to update things, then how can an immediately subsequent pull lead to updates?


% git -C /usr/ports switch main && git -C /usr/src switch main
Already on 'main'
Your branch is up to date with 'freebsd/main'.
M=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sys/netgraph/bluetooth/hci/ng= _hci_cmds.c
M=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sys/netgraph/bluetooth/hci/ng= _hci_evnt.c
M=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sys/netgraph/bluetooth/includ= e/ng_hci.h
Already on 'main'
Your branch is up to date with 'origin/main'.
% git -C /usr/ports pull --ff-only && git -C /usr/src pull --ff-only
remote: Enumerating objects: 3284, done.
remote: Counting objects: 100% (840/840), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3284 (delta 837), reused 837 (delta 837), pack-reused 2444
Receiving objects: 100% (3284/3284), 1.92 MiB | 1.11 MiB/s, done.
Resolving deltas: 100% (1985/1985), completed with 474 local objects.
From ht= tps://git.freebsd.org/ports
=C2=A0=C2=A0 fb6a9af3e898..80afc63eeb99=C2=A0 main=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 -> freebsd/main
=C2=A0=C2=A0 749ca3ec2e60..c3552efe398e=C2=A0 2022Q4=C2=A0=C2=A0=C2= =A0=C2=A0 -> freebsd/2022Q4
Updating fb6a9af3e898..80afc63eeb99
^C
% cat /usr/ports/.git/config
[core]
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 repositoryformatversion = =3D 0
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 filemode =3D true
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 bare =3D false
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 logallrefupdates =3D tru= e
[remote "freebsd"]
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 url =3D https://git.freebsd.org/por= ts.git
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fetch =3D +refs/heads/*:= refs/remotes/freebsd/*
[branch "main"]
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 remote =3D freebsd
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 merge =3D refs/heads/mai= n
%

Gi= t - git-switch Documentation



--
Nun= o Teixeira
FreeBSD Committer (ports)
--0000000000005b62e405eed73412--