Speeding up slower Git operations

Ed Maste emaste at freebsd.org
Tue May 28 18:55:51 UTC 2019

On Tue, 28 May 2019 at 13:57, Ilya Bakulin <ilya at bakulin.de> wrote:
> You are counting commits behind HEAD which is a mere pointer to the current branch head. So if you are working on some "topic" branch then the number becomes effectively useless since it will count a number of commits behind that topic branch HEAD. So this number alone is not sufficient unless you also append "-dirty" or something else to denote the "canonical" build done from a clean git checkout of the official FreeBSD repository. Which is a good idea anyway, I guess.

Correct. For builds of an unmodified upstream version the (branch,
rev-list --count) will be unique and consistent.

Today for builds from git we include in uname the corresponding SVN
version, the git hash, and the branch - e.g. a test machine here
reports "r333291+95e9f145d658(HEAD-TESTING)". I'm not sure what the
best way to report it would be, but in the absence of svn we could
indicate something like
"95e9f145d658(HEAD-TESTING) c251421".

> So that when somebody reports a bug on some mailing list and includes a kernel version number (or freebsd-version output) it's immediately obvious that they are using a non-official kernel.

We do that today as well, appending -dirty for builds from a modified
git tree and M from a modified Subversion tree.

More information about the freebsd-git mailing list