Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Nov 2020 17:30:56 -0500
From:      Dan Langille <dan@langille.org>
To:        freebsd-git@freebsd.org
Subject:   checking out a commits on port quarterly branch
Message-ID:  <5E8AEDD5-327A-46A0-A186-EDBC616A9F89@langille.org>

next in thread | raw e-mail | index | archive | help
When FreshPorts processes a commit, it needs a working copy of the repo =
as it was at the time of that commit.

I have this working on head. I am trying to figure out how to do that =
when the commit is on a branch.

To get a copy of the branch, I do:

$ git checkout branches/2020Q4
$ git branch
  branches/2020Q2
  branches/2020Q3
* branches/2020Q4
  master

Next, I want the tree as it existed at commit =
46433baae934d92698422495b72f811839caa1a9

i.e. =
https://github.com/freebsd/freebsd-ports/commit/46433baae934d92698422495b7=
2f811839caa1a9

My first attempt is

$ git checkout 46433baae934d92698422495b72f811839caa1a9
Note: switching to '46433baae934d92698422495b72f811839caa1a9'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in =
this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to =
false

HEAD is now at 46433baae934 MFH: r555565

That "MFH: r555565' message indicates that I am at the right commit.

Is this a concern?

$ git branch
* (HEAD detached at 46433baae934)
  branches/2020Q2
  branches/2020Q3
  branches/2020Q4
  master


Am I doing this right?

Thank you


--=20
Dan Langille - BSDCan / PGCon
dan@langille.org





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5E8AEDD5-327A-46A0-A186-EDBC616A9F89>