diff options
author | Karl Berry <karl@freefriends.org> | 2015-11-09 22:44:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-11-09 22:44:07 +0000 |
commit | 6eb3a7b847e716cc912c1273d6d03bc960e4cdc1 (patch) | |
tree | b7f12e0c398cde3a59d7b22d9465a5dd76aff204 | |
parent | 44d34fff584d1ae1cf6fa8a66b447c188075a441 (diff) |
gitinfo2 (9nov15)
git-svn-id: svn://tug.org/texlive/trunk@38807 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/gitinfo2/README | 15 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/gitinfo2/gitPseudoHeadInfo.gin | 22 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/gitinfo2/gitinfo2.pdf | bin | 123452 -> 125252 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/gitinfo2/gitinfo2.tex | 64 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/gitinfo2/post-xxx-sample.txt | 11 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/gitinfo2/gitexinfo.sty | 27 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/gitinfo2/gitinfo2.sty | 20 |
7 files changed, 99 insertions, 60 deletions
diff --git a/Master/texmf-dist/doc/latex/gitinfo2/README b/Master/texmf-dist/doc/latex/gitinfo2/README index a1c01d53f24..a84de3d24f4 100644 --- a/Master/texmf-dist/doc/latex/gitinfo2/README +++ b/Master/texmf-dist/doc/latex/gitinfo2/README @@ -10,17 +10,6 @@ please see the accompanying manual: gitinfo2.pdf. Change History ~~~~~~~~~~~~~~ -Warning: existing repositories using gitinfo will need to be migrated -in order to take advantage of the new features in gitinfo2. +Current Release: 2.0.5 2015-11-09 -2014-09-04 2.0.2 Corrected packaging errors - Improve default appearance of watermarks - -2014-05-12 2.0 Changed package name for backward compatibility - Improved documentation - New tags for improved Release annotation - A relocated 'gitHeadInfo.gin' file - Re-engineered page styles for Memoir users - Watermarking facility - -2011-08-29 1.0 Initial release +Please see gitinfo2.pdf in the package documentation directory diff --git a/Master/texmf-dist/doc/latex/gitinfo2/gitPseudoHeadInfo.gin b/Master/texmf-dist/doc/latex/gitinfo2/gitPseudoHeadInfo.gin index 28dafc236a9..f89cdfd4bc6 100644 --- a/Master/texmf-dist/doc/latex/gitinfo2/gitPseudoHeadInfo.gin +++ b/Master/texmf-dist/doc/latex/gitinfo2/gitPseudoHeadInfo.gin @@ -1,17 +1,17 @@ \usepackage[% - shash={e981cef}, - lhash={e981cefe10ce8035de354461cb80c15ee4a39409}, + shash={c8c0570}, + lhash={c8c0570274cae7dce60a19396493512273a42e84}, authname={Brent Longborough}, authemail={brent+ctancontrib@longborough.org}, - authsdate={2014-10-03}, - authidate={2014-10-03 22:57:33 +0100}, - authudate={1412373453}, + authsdate={2015-11-08}, + authidate={2015-11-08 20:41:51 +0000}, + authudate={1447015311}, commname={Brent Longborough}, commemail={brent+ctancontrib@longborough.org}, - commsdate={2014-10-03}, - commidate={2014-10-03 22:57:33 +0100}, - commudate={1412373453}, - refnames={ (HEAD, tag: 2.0.4, origin/CTAN, CTAN)}, - firsttagdescribe={2.0.4}, - reltag={2.0.4-0-ge981cef} + commsdate={2015-11-08}, + commidate={2015-11-08 20:41:51 +0000}, + commudate={1447015311}, + refnames={ (HEAD -> CTAN)}, + firsttagdescribe={2.0.5-2-gc8c0570}, + reltag={2.0.5-2-gc8c0570} ]{gitexinfo}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/gitinfo2/gitinfo2.pdf b/Master/texmf-dist/doc/latex/gitinfo2/gitinfo2.pdf Binary files differindex 48d14a354f9..4d20f8ee2b2 100644 --- a/Master/texmf-dist/doc/latex/gitinfo2/gitinfo2.pdf +++ b/Master/texmf-dist/doc/latex/gitinfo2/gitinfo2.pdf diff --git a/Master/texmf-dist/doc/latex/gitinfo2/gitinfo2.tex b/Master/texmf-dist/doc/latex/gitinfo2/gitinfo2.tex index ddc488debc7..5fad32c47f6 100644 --- a/Master/texmf-dist/doc/latex/gitinfo2/gitinfo2.tex +++ b/Master/texmf-dist/doc/latex/gitinfo2/gitinfo2.tex @@ -31,8 +31,9 @@ % ----------------------------------------------------- % End of tweak % ===================================================== -\usepackage[nodayofweek,level]{datetime} -\longdate{} +\usepackage[british]{babel} +\selectlanguage{british} +\usepackage[style=iso]{datetime2} \usepackage[pcount,grumpy,mark,markifdirty]{gitinfo2} \usepackage{tgpagella} \usepackage{tgadventor} @@ -100,7 +101,7 @@ \Large A package for accessing metadata\\from the \git\ \textsc{dvcs} } \author{Brent Longborough} -\date{\displaydate{gitdate}} +\date{\DTMenglishmonthname{\DTMfetchmonth{gitdate}} \DTMfetchyear{gitdate}} \maketitle {\centering @@ -210,7 +211,8 @@ If not, I suggest you follow these steps: For this example, let's suppose that the root of the working tree is in \texttt{\textasciitilde/compsci} -\item Copy the file \texttt{post-xxx-sample.txt} as \texttt{post-checkout} +\item Copy the file \texttt{post-xxx-sample.txt} +(which is in the same folder of your \TeX{} distribution as this pdf) into the \git\ hooks directory in your working copy. In our example case, you should end up with a file called \texttt{\textasciitilde/compsci/.git/hooks/post-checkout} @@ -310,7 +312,10 @@ RELTAG=\$(git describe \textellipsis\ --match '*' \textellipsis) would allow you to find any tag whatsoever. You can change the hooks without needing to alter \tpname, -since whatever tag is found is used as-is. +since any tag found is used `as-is'. + +\emph{Important note:} The \texttt{--match} parameter is a unix glob, +\emph{not} a regular expression. This has tripped up a number of users. % ----------------------------------------------------- \chapter{Using the package} @@ -461,7 +466,10 @@ Here they are: Depending on how you use \git,\footnote{For example, checking out unnamed branches} this information may not be available, and will then be shown as the default or specified value of - the \texttt{missing} package option.\\ + the \texttt{missing} package option. + For \git{} versions before 2.0.0, where the current HEAD commit refers + to more than one branch head, this value may be different from the + currectly checked-out branch.\\ Example: \textit{\gitBranch} \item[gitDirty] @@ -649,6 +657,7 @@ For example: \begin{verbatim} \color{gray}\small\sffamily \end{verbatim} +if the \sfit{xcolor} package is loaded; if not, \verb!! is simply omitted. You can tailor this by redefining \verb!\gitMarkFormat!. For example: \begin{verbatim} @@ -732,21 +741,24 @@ You can see an example in the footer of this page, above the \tpname\ watermark. % - - - - - - - - - - - - - - - - - - - - - - - - - - - -\section{For \sfit{datetime} users} +\section{For \sfit{datetime2} users} \label{sect:dtuser} -If you use Nicola Talbot's excellent \sfit{datetime} package, +If you use Nicola Talbot's excellent \sfit{datetime2} package, \tpname\ copies the value of the tag {\ttfamily\bfseries gitAuthorDate} as a new date object named \sfit{gitdate}, -which you can then refer to with other \sfit{datetime} +which you can then refer to with other \sfit{datetime2} functions. -Please refer to the \sfit{datetime} manual for +Please refer to the \sfit{datetime2} manual for further details, especially in the section entitled `Saving Dates'. -If you use it, you must load \sfit{datetime} +If you use it, you must load \sfit{datetime2} before you load \tpname. +The \sfit{datetime} package is also supported, +though deprecated. + % - - - - - - - - - - - - - - - - - - - - - - - - - - - \section{Notes on the sequence of events} \label{sect:seqeve} @@ -806,6 +818,16 @@ and a clean working copy. \chapter{Etc} \section{Release notes} +\rpara{R2.0.5: 2015-11-09 -- Bug fixes and general improvements} +\begin{itemize} +\item Support for the \sfit{datetime2} package +\item Provide correct committer metadata in hook sample +\item Change Warning to Info when \sfit{gitHeadinfo.gin} is found +\item Move all package dependencies from \sfit{gitexinfo.sty} to \sfit{gitinfo2.sty} +\item Support for \git{} Version 2 log output, with more accurate branch name analysis +\item Only use colours if the \sfit{xcolor} package is loaded +\end{itemize} + \rpara{R2.0.4: 2014-10-03 -- Fixes and documentation improvements} \begin{itemize} \item More robust \git\ hooks, @@ -841,7 +863,7 @@ who rescued me from the jaws of the TeX parser by explaining \textbackslash expandafter. I'd also like to register my thanks to the owners of the packages on which -\tpname\ depends: datetime, eso-pic, etoolbox, kvoptions, and xstring. +\tpname\ depends: datetime2, eso-pic, etoolbox, kvoptions, and xstring. Many people have written to me kindly to point out some of the defects in \opname, and to offer code. @@ -864,16 +886,22 @@ the deduplication of \metaname. My sincere thanks, too, to Adrian Burd, -Felix Wenger, -ivokabadshow (on GitHub), +cedb12 (on GitHub), +Maximilian Held, Johannes Hoetzer, -Martin W Leidig, +ivokabadshow (on GitHub), Mikko Korpela, +Martin W Leidig, +Enrico Malizia, +Ken Mankoff, +Ryan Matlock, +Robbie Morrison, Nik (of gwdg nokta de), Omid (of gmail nokta com), -Robbie Morrison, -Ryan Matlock, and -Sasaki~Suguru. +Sasaki~Suguru, +Tor\-bjørn~T (on GitHub and TeX.SE), +and +Felix Wenger. Special thanks to Karl Berry for helping me to reduce my incompetence with \texttt{ctanify}. diff --git a/Master/texmf-dist/doc/latex/gitinfo2/post-xxx-sample.txt b/Master/texmf-dist/doc/latex/gitinfo2/post-xxx-sample.txt index df0730af47b..f04d4130582 100644 --- a/Master/texmf-dist/doc/latex/gitinfo2/post-xxx-sample.txt +++ b/Master/texmf-dist/doc/latex/gitinfo2/post-xxx-sample.txt @@ -1,6 +1,7 @@ #!/bin/sh # Copyright 2014 Brent Longborough # Part of gitinfo2 package Version 2 +# Release 2.0.5 # Please read gitinfo2.pdf for licencing and other details # ----------------------------------------------------- # Post-{commit,checkout,merge} hook for the gitinfo2 package @@ -19,11 +20,11 @@ git --no-pager log -1 --date=short --decorate=short \ authsdate={%ad}, authidate={%ai}, authudate={%at}, - commname={%an}, - commemail={%ae}, - commsdate={%ad}, - commidate={%ai}, - commudate={%at}, + commname={%cn}, + commemail={%ce}, + commsdate={%cd}, + commidate={%ci}, + commudate={%ct}, refnames={%d}, firsttagdescribe={$FIRSTTAG}, reltag={$RELTAG} diff --git a/Master/texmf-dist/tex/latex/gitinfo2/gitexinfo.sty b/Master/texmf-dist/tex/latex/gitinfo2/gitexinfo.sty index 813fec35b57..78ecb9ea294 100644 --- a/Master/texmf-dist/tex/latex/gitinfo2/gitexinfo.sty +++ b/Master/texmf-dist/tex/latex/gitinfo2/gitexinfo.sty @@ -18,10 +18,7 @@ % and gitPseudoHeadInfo.gin % ----------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{gitexinfo}[2014/10/03 v2.0.4 Auxiliary package for gitinfo2] -\RequirePackage{kvoptions} -\RequirePackage{xstring} -\RequirePackage{etoolbox} +\ProvidesPackage{gitexinfo}[2015/11/08 v2.0.5 Auxiliary package for gitinfo2] \SetupKeyvalOptions{family=gitinfo,prefix=gitInf@} \DeclareStringOption{shash} \DeclareStringOption{lhash} @@ -73,12 +70,22 @@ }% }% \expandafter\docsvlist\expandafter{#1}% - \StrDel{#1}{)}[\bcut]% - \StrDel{\bcut}{(HEAD}[\bcut]% - \StrCount{\bcut}{, }[\xcut]% - \StrCut[\xcut]{\bcut}{, }{\bcut}{\xcut}% - \IfEq{\xcut}{}{}{% - \renewcommand{\gitBranch}{\xcut}% + \StrDel{#1}{(}[\bcut]% + \StrDel{\bcut}{)}[\bcut]% + \IfSubStr{\bcut}{->}{% git version 2+? + \StrBetween{\bcut,}{HEAD -> }{,}[\bcut]% yes - no problem + }{% + \StrCount{\bcut}{, }[\xcut]% + \IfEq{\xcut}{0}{% detached head? + }{% no + \StrCut[\xcut]{\bcut}{, }{\lcut}{\bcut}% git vv < 2 - take last token + }% (not always accurate) + } + \IfEq{\bcut}{}{}{% + \IfEq{\bcut}{HEAD}{% detached head? + }{% no - we have the branch name + \renewcommand{\gitBranch}{\bcut}% + }% }% }% \newcommand{\git@taglist}[1]{% diff --git a/Master/texmf-dist/tex/latex/gitinfo2/gitinfo2.sty b/Master/texmf-dist/tex/latex/gitinfo2/gitinfo2.sty index c50777ff67f..bfe37398131 100644 --- a/Master/texmf-dist/tex/latex/gitinfo2/gitinfo2.sty +++ b/Master/texmf-dist/tex/latex/gitinfo2/gitinfo2.sty @@ -18,8 +18,9 @@ % and gitPseudoHeadInfo.gin % ----------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{gitinfo2}[2014/10/03 v2.0.4 git revision information] +\ProvidesPackage{gitinfo2}[2015/11/08 v2.0.5 git revision information] \RequirePackage{etoolbox} +\RequirePackage{xstring} \RequirePackage{kvoptions} \RequirePackage{eso-pic} \SetupKeyvalOptions{family=gitinfo,prefix=gitInf@} @@ -63,7 +64,11 @@ \newcommand{\gitRoff}{} \newcommand{\gitDescribe}{(None)} \newcommand{\gitMarkPref}{[git]} -\newcommand{\gitMarkFormat}{\color{gray}\small\sffamily} +\@ifpackageloaded{xcolor}{% + \newcommand{\gitMarkFormat}{\color{gray}\small\sffamily}% +}{% + \newcommand{\gitMarkFormat}{\small\sffamily}% +} \newcommand{\gitMark}{} \newcommand{\gitWrapEmail}[1]{#1} % private values @@ -106,7 +111,7 @@ \else \edef\GI@repo@prefix{../\GI@repo@prefix}% \IfFileExists{\GI@githeadinfo@file}{% - \PackageWarningNoLine{gitinfo2}{% + \PackageInfo{gitinfo2}{% gitinfo2 found : \GI@githeadinfo@file \MessageBreak }% \GI@export@macro\GI@githeadinfo@file @@ -187,6 +192,15 @@ % --------------------------------------------------------------------- % Datetime integration % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +\@ifpackageloaded{datetime2}{% + \IfEq{\gitAuthorDate}{\gitInf@missing}{% + \DTMsavedate{gitdate}{\THEDAY-\THEMONTH-\THEYEAR} + }{% + \StrCut{\gitAuthorDate}{-}{\gitInf@year}{\gitInf@md} + \StrCut{\gitInf@md}{-}{\gitInf@month}{\gitInf@day} + \DTMsavenoparsedate{gitdate}{\gitInf@year}{\gitInf@month}{\gitInf@day}{-1} + } +}{}% \@ifpackageloaded{datetime}{% \IfEq{\gitAuthorDate}{\gitInf@missing}{% \newdate{gitdate}{\THEDAY}{\THEMONTH}{\THEYEAR} |