From ecbeb0aa47f8a1e29bb462cea9d90e5eb2cb6978 Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Tue, 12 Dec 2023 22:55:58 -0800 Subject: Try alternate approach for getting Git branch/commit info. --- doc/codec2.tex | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'doc/codec2.tex') diff --git a/doc/codec2.tex b/doc/codec2.tex index c3538ea..89218fa 100644 --- a/doc/codec2.tex +++ b/doc/codec2.tex @@ -9,14 +9,14 @@ \usepackage{catchfile} \usepackage{siunitx} -\CatchFileDef{\headfull}{../.git/HEAD}{} -\StrGobbleRight{\headfull}{1}[\head] -\StrBehind[2]{\head}{/}[\branch] -\IfFileExists{../.git/refs/heads/\branch}{% - \CatchFileDef{\commit}{../.git/refs/heads/\branch}{}}{% - \newcommand{\commit}{\dots~(in \emph{packed-refs})}} \newcommand{\gitrevision}{% - \StrLeft{\commit}{7}% + \immediate\write18{git log -n1 --oneline | awk '{print $1;}' > gitrevision.txt} + \input{gitrevision.txt} +} + +\newcommand{\branch}{% + \immediate\write18{git branch --show-current > gitbranch.txt} + \input{gitbranch.txt} } \title{Codec 2} @@ -53,7 +53,7 @@ pinstyle/.style = {pin edge={to-,thin,black}} \draw (#1,#2-0.25) -- (#1,#2+0.25); } -%\maketitle +\maketitle \section{Introduction} -- cgit v1.2.3