Index: en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml =================================================================== --- en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml +++ en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml @@ -2549,6 +2549,86 @@ future. + + Using <varname>USE_GITHUB</varname> to Access + a Commit Between Two Versions + + If the current version of the software use a + Git tag, and the port needs to be + updated to a newer, intermediate version, without a tag, use + &man.git-describe.1; to find out the version to use: + + &prompt.user; git describe --tags f0038b1 +v0.7.3-14-gf0038b1 + + v0.7.3-14-gf0038b1 can be splited + into three parts: + + + + v0.7.3 + + + This is the last Git + tag that appears in the commit history before the + requested commit. + + + + + -14 + + + This means that the requested commit, + f0038b1, is the 14th commit after + the v0.7.3 tag. + + + + + -gf0038b1 + + + The -g means + Git, and + the f0038b1 is the commit hash + that this reference points to. + + + + + PORTNAME= bar +DISTVERSIONPREFIX= v +DISTVERSION= 0.7.3-14 +DISTVERSIONSUFFIX= -gf0038b1 + +USE_GITHUB= yes + + This creates a versioning scheme that increases over + time (well, over commits), and does not conflict with the + creation of a 0.7.4 version. + (see for + details on &man.pkg-version.8;): + + &prompt.user; pkg version -t 0.7.3 0.7.3.14 +< +&prompt.user; pkg version -t 0.7.3.14 0.7.4 +< + + + If the requested commit is the same as a tag, a + shorter description is shown by default. The longer + version is equivalent: + + &prompt.user; git describe --tags c66c71d +v0.7.3 +&prompt.user; git describe --tags --long c66c71d +v0.7.3-0-gc66c71d + + + + + Fetching Multiple Files from GitHub Index: share/xml/man-refs.ent =================================================================== --- share/xml/man-refs.ent +++ share/xml/man-refs.ent @@ -270,6 +270,7 @@ getfacl1"> getopt1"> getopts1"> +git-describe1"> git-submodule1"> glob1"> gnu-ar1">