|
@ -234,6 +234,62 @@ verbose_say () { |
|
|
fi |
|
|
fi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
gitinfo () { |
|
|
|
|
|
local CURPWD=$(pwd) |
|
|
|
|
|
echo "$git_dir" |
|
|
|
|
|
echo "$CURPWD" |
|
|
|
|
|
local OLDFIRSTTAG=$(git describe --tags $old 2>/dev/null) |
|
|
|
|
|
local OLDRELTAG=$(git describe --tags --long --match '[0-9]*.*' $old 2>/dev/null) |
|
|
|
|
|
|
|
|
|
|
|
local NEWFIRSTTAG=$(git describe --tags $new 2>/dev/null) |
|
|
|
|
|
local NEWRELTAG=$(git describe --tags --long --match '[0-9]*.*' $new 2>/dev/null) |
|
|
|
|
|
|
|
|
|
|
|
local FIRSTTAGDELIM=$([ ! -z "$OLDFIRSTTAG" ] && echo ", new:") |
|
|
|
|
|
local RELTAGDELIM=$([ ! -z "$OLDRELTAG" ] && echo ", new:") |
|
|
|
|
|
|
|
|
|
|
|
# Hoover up the metadata |
|
|
|
|
|
git --no-pager log -1 --date=short \ |
|
|
|
|
|
--pretty=format:"\usepackage[% |
|
|
|
|
|
shash={old: %h, |
|
|
|
|
|
lhash={old: %H, |
|
|
|
|
|
authname={old: %an, |
|
|
|
|
|
authemail={old: %ae, |
|
|
|
|
|
authsdate={old: %ad, |
|
|
|
|
|
authidate={old: %ai, |
|
|
|
|
|
authudate={old: %at, |
|
|
|
|
|
commname={old: %an, |
|
|
|
|
|
commemail={old: %ae, |
|
|
|
|
|
commsdate={old: %ad, |
|
|
|
|
|
commidate={old: %ai, |
|
|
|
|
|
commudate={old: %at, |
|
|
|
|
|
refnames={ |
|
|
|
|
|
firsttagdescribe={$OLDFIRSTTAG$FIRSTTAGDELIM |
|
|
|
|
|
reltag={$OLDRELTAG$RELTAGDELIM |
|
|
|
|
|
" $old > "$CURPWD"/old.gin |
|
|
|
|
|
|
|
|
|
|
|
git --no-pager log -1 --date=short \ |
|
|
|
|
|
--pretty=format:" |
|
|
|
|
|
new: %h}, |
|
|
|
|
|
new: %H}, |
|
|
|
|
|
new: %an}, |
|
|
|
|
|
new: %ae}, |
|
|
|
|
|
new: %ad}, |
|
|
|
|
|
new: %ai}, |
|
|
|
|
|
new: %at}, |
|
|
|
|
|
new: %an}, |
|
|
|
|
|
new: %ae}, |
|
|
|
|
|
new: %ad}, |
|
|
|
|
|
new: %ai}, |
|
|
|
|
|
new: %at}, |
|
|
|
|
|
}, |
|
|
|
|
|
$NEWFIRSTTAG}, |
|
|
|
|
|
$NEWRELTAG} |
|
|
|
|
|
]{gitexinfo}" $new > "$CURPWD"/new.gin |
|
|
|
|
|
|
|
|
|
|
|
cd "$CURPWD" |
|
|
|
|
|
paste -d '\0' old.gin new.gin > .git/gitHeadInfo.gin |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
old= |
|
|
old= |
|
|
new= |
|
|
new= |
|
|
main= |
|
|
main= |
|
@ -667,6 +723,12 @@ cd .. |
|
|
|
|
|
|
|
|
verbose_done |
|
|
verbose_done |
|
|
|
|
|
|
|
|
|
|
|
# pull git commit information into a gitinfo2 style text file |
|
|
|
|
|
cd new |
|
|
|
|
|
mkdir .git |
|
|
|
|
|
gitinfo |
|
|
|
|
|
cd .. |
|
|
|
|
|
|
|
|
for dir in old new |
|
|
for dir in old new |
|
|
do |
|
|
do |
|
|
verbose "Running preparation command $prepare_cmd in $dir/$git_prefix" |
|
|
verbose "Running preparation command $prepare_cmd in $dir/$git_prefix" |
|
|