The code had 2 issues:
1. used obsolete 'output' if Git executable was missing. There was a
possibility that output variable was never set and used some garbage
value from parent scope.
2. version pattern matching was too liberal and would match
absolute any long txt so long as it has some numbers in it that matched
a typical version number.
A ParaView user noted that the determine version script (which is
essentially the same for ParaView and VTK-m) incorrectly used the
results of git describe when the source actually came from a tarball
distribution that was placed in another git archive. (The SHA was
incorrectly taken from the enclosing git project.) See the ParaView bug
for more details on the report:
https://gitlab.kitware.com/paraview/paraview/issues/17761
This fix simply checks to make sure the the source directory has the
.git subdirectory expected in all git projects.
Sandia National Laboratories recently changed management from the
Sandia Corporation to the National Technology & Engineering Solutions
of Sandia, LLC (NTESS). The copyright statements need to be updated
accordingly.