]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
configure: .git can be a file as well
authorJason Ish <jason.ish@oisf.net>
Fri, 5 Apr 2024 16:33:14 +0000 (10:33 -0600)
committerVictor Julien <victor@inliniac.net>
Mon, 8 Apr 2024 12:53:38 +0000 (14:53 +0200)
In worktree scenarios, .git is a file. Assuming its a directory causes
the release date to check the ChangeLog instead of the last commit,
while not a big issue, can be confusing.

configure.ac

index 397e03ad5799ed30d66a46ef0ef3ce43e0d9b7ed..1118a578b7eaaa99d3f7a6712f67705f70416339 100644 (file)
@@ -2513,7 +2513,7 @@ return 0;
 # get git revision and last commit date
     AC_PATH_PROG(HAVE_GIT_CMD, git, "no")
     if test "$HAVE_GIT_CMD" != "no"; then
-        if [ test -d .git ]; then
+        if [ test -e .git ]; then
             REVISION=`git rev-parse --short HEAD`
             LAST_COMMIT_DATE=`git log -1 --date=short --pretty=format:%cd`
             REVISION="$REVISION $LAST_COMMIT_DATE"