Discussion:
FreeBSD mini-Git Primer
Graham Perrin
2021-04-08 08:14:44 UTC
Permalink
On 02/03/2021 06:33, Graham Perrin wrote:

Re: Git, shallow clone hashes, commit counts and system/security updates
Re: Panic after updating from source

You need to be aware that the shallow clone hash will not include the
commit count which will be used in future security updates to make it
easy
to check whether your system needs to be updated or not. A full clone
does
require more space, but I was surprised at how little extra space it
requires. Warner  is updating his git mini-guide to point out this
issue.
If you run STABLE, it's a really significant concern. You can convert
the
shallow clone to a full one with "git fetch --unshallow". This will take
some time to run.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
… Thank you, Kevin and Warner.
I see the FreeBSD mini-Git Primer in the November/December 2020 edition
of the FreeBSD Journal
<https://issue.freebsdfoundation.org/publication/?i=690210&ver=html5&p=8>
(and the review copy that was publicised in September 2020).

For news of a future edition, if any, should I simply watch
<https://bsdimp.blogspot.com/search/label/git>?

Thanks

(I have another question about deep and shallow … I'll post separately
to freebsd-questions …)
Kevin Oberman
2021-04-09 23:16:09 UTC
Permalink
The updated mini-Git Primer is now included in the Developer's Handbook.
See Chapter 5. I have sent a number of suggestions for some non-technical
changes to Warner, but have not heard back yet. Perhaps he didn't care for
them. As I am a real novice who has had to destroy my clone of the sources
and start over twice, I find it unlikely that i will be of significant use
on the technical side for a while. Git is philosophically very different
from RCS/CVS/SVN and the different mindset is taking me a while to fully
grasp. I will say that specifying a hash that is in main but not part of
the branch you are working on is probably a rather poor idea. I probably
could have easily fixed it, but I had no luck in finding the right
incantation and eventually blew /usr/src away and started over. (How do you
fix a detached clone?)

I also find net/gitup a marvelous tool for replacing portsnap. In several
ways, it is clearly superior and I look forward to seeing it in the base. I
mean, what is simpler than:
# gitup -c ports (just once to create the initial clone)
#gitup ports (to update, perhaps in periodic(8))
Of course, you do need to edit gitup.conf to select the preferred branch
and repo site, but it's pretty obvious.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: ***@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
Post by Graham Perrin
Re: Git, shallow clone hashes, commit counts and system/security updates
Re: Panic after updating from source

You need to be aware that the shallow clone hash will not include the
commit count which will be used in future security updates to make it
easy
to check whether your system needs to be updated or not. A full clone
does
require more space, but I was surprised at how little extra space it
requires. Warner is updating his git mini-guide to point out this
issue.
If you run STABLE, it's a really significant concern. You can convert
the
shallow clone to a full one with "git fetch --unshallow". This will take
some time to run.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
… Thank you, Kevin and Warner.
I see the FreeBSD mini-Git Primer in the November/December 2020 edition
of the FreeBSD Journal
<https://issue.freebsdfoundation.org/publication/?i=690210&ver=html5&p=8>
(and the review copy that was publicised in September 2020).
For news of a future edition, if any, should I simply watch
<https://bsdimp.blogspot.com/search/label/git>?
Thanks
(I have another question about deep and shallow … I'll post separately
to freebsd-questions …)
Graham Perrin
2021-04-10 03:43:14 UTC
Permalink
Post by Kevin Oberman
The updated mini-Git Primer is now included in the Developer's
Handbook. See Chapter 5.

Thanks!

<https://docs.freebsd.org/en/articles/committers-guide/#git-primer>

There's a slight discrepancy between
<https://docs.freebsd.org/en/articles/committers-guide/#_shallow_clone>
(Committer's Guide, undated) exemplifying '-o freebsd' and
<https://docs.freebsd.org/en/books/handbook/mirrors/#git-usage> (FreeBSD
Handbook, undated) without the option in at least one example.

-o <name>, --origin <name> was recently discussed under
<https://forums.FreeBSD.org/threads/ports-transitioned-to-git.79598/post-504699>


<https://docs.freebsd.org/en/books/developers-handbook/book.html#vendor-import-svn>
(FreeBSD Developers' Handbook, 2021-01-12) there's some
Subversion-related content in chapter five.

<https://docs.freebsd.org/en/> lacks a sidebar and currently refers to
what appears to be an older edition of the FreeBSD Developers' Handbook:
<https://docs.freebsd.org/en/books/developers-handbook/> (2020-06-15,
revision 54255 with reference to
<https://cgit.freebsd.org/doc/commit/?id=> (bad link)).

<https://docs.freebsd.org/en/> is also mistakenly self-referencing when
attempting to reach the FreeBSD home page (either click 'Home', or the
FreeBSD icon).

<https://www.freebsd.org/docs/> includes a sidebar.
Graham Perrin
2021-04-10 07:40:49 UTC
Permalink
(Dropping freebsd-current from the list of addressees at this point …)
… There's a slight discrepancy between
<https://docs.freebsd.org/en/articles/committers-guide/#_shallow_clone
<https://docs.freebsd.org/en/articles/committers-guide/#_shallow_clone>>
(Committer's Guide, undated) exemplifying '-o freebsd' and
<https://docs.freebsd.org/en/books/handbook/mirrors/#git-usage
<https://docs.freebsd.org/en/books/handbook/mirrors/#git-usage>>
(FreeBSD
Handbook, undated) without the option in at least one example.
-o <name>, --origin <name> was recently discussed under
<https://forums.FreeBSD.org/threads/ports-transitioned-to-git.79598/post-504699
<https://forums.FreeBSD.org/threads/ports-transitioned-to-git.79598/post-504699>>
Yes. The examples in mirrors were written and copied from elsewhere
about the same time I decided to make all examples use  -o freebsd. I
missed these. I'm about  to push a fix.
Thanks, Warner.

----

Incidentally (for people with an interest in documentation) I spent
around half an hour trying to understand how I had found my way to a
mirror of the handbook. I didn't recall being there as a result of a
Google search. Eventually I realised:

* /mirrors/ is used for Appendix A, which is about much more than
mirrors; and

* official mirrors a subsection of Appendix D, with mirrors nowhere in
the URL.

----

At <https://docs.freebsd.org/en/books/handbook/partv/> in lieu of the
word 'Appendix' four times, there should be:

A. …
B. …
C. …
D. …

----

<https://docs.freebsd.org/en/books/handbook/> lacks a link to the glossary.

I stumbled into the glossary by clicking 'Next' at the foot of
<https://docs.freebsd.org/en/books/handbook/pgpkeys/>.

Loading...