topgit_*_prepare.awk: do not append ^{} to missing
commitb632bba34362c68419632e11e03d3eb4561fa9d7
authorKyle J. McKay <mackyle@gmail.com>
Thu, 15 Feb 2018 21:51:24 +0000 (15 13:51 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Thu, 15 Feb 2018 21:51:24 +0000 (15 13:51 -0800)
tree3b5f8219c1143060f2e97c4c877269b20b8ee8d9
parent22958449faf1571a2da7674e206b62ec537ad883
topgit_*_prepare.awk: do not append ^{} to missing

When supplying the value to use for a "missing" .topmsg file it
may, rarely, be useful to supply something other than the empty
blob hash.

The convenient way to supply something like this is via the
<rev>:<path> syntax.

Unfortunately we cannot simply append "^{blob}" to that expecting
the result to be verified to be a blob because everything after the
":" will be taken as part of the <path>.

Instead remove the current "^{}" that was being appended in cases
K==1 and K==4 (but not K==2 or K==3) so that all cases are consistent
and the "missing" value is always treated the same.

Although topgit_deps_prepare.awk does not actually generate a "K"
value it needs the same fix for the equivalent K==1 and K==4 case.

The subsequent *.awk files that consume the output of these scripts
(after it's been passed through the appropriate "git cat-file"
command) attempt to deal with non-blob results gracefully.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
awk/topgit_deps_prepare.awk
awk/topgit_msg_prepare.awk