Jeff King <peff@xxxxxxxx> writes: > On Thu, Dec 19, 2024 at 04:53:37PM +0100, Patrick Steinhardt wrote: > >> GIT_VERSION=$(expr "$VN" : v*'\(.*\)') >> -GIT_BUILT_FROM_COMMIT=$(git -C "$SOURCE_DIR" rev-parse -q --verify HEAD 2>/dev/null) >> -GIT_DATE=$(git -C "$SOURCE_DIR" show --quiet --format='%as' 2>/dev/null) >> + >> +if test -z "$GIT_BUILT_FROM_COMMIT" >> +then >> + GIT_BUILT_FROM_COMMIT=$(git -C "$SOURCE_DIR" rev-parse -q --verify HEAD 2>/dev/null) >> +fi >> + >> +if test -z "$GIT_DATE" >> +then >> + GIT_DATE=$(git -C "$SOURCE_DIR" show --quiet --format='%as' 2>/dev/null) >> +fi > > Looks good. I doubt anybody would want to override BUILT_FROM_COMMIT > (and it was never possible to do so, even before your recent patches), > but it's reasonable to include it as well. Thanks, both.