]> git.ipfire.org Git - thirdparty/git.git/commitdiff
versioncmp.h: move declarations for versioncmp.c functions from cache.h
authorElijah Newren <newren@gmail.com>
Sat, 22 Apr 2023 20:17:17 +0000 (20:17 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Apr 2023 19:47:32 +0000 (12:47 -0700)
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
ref-filter.c
versioncmp.c
versioncmp.h [new file with mode: 0644]

diff --git a/cache.h b/cache.h
index dde275c9301770de526f045c3f65abab6bdc3fc5..6955745cccdac059115a783ddc6cf6734445c04e 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -648,6 +648,4 @@ int stat_validity_check(struct stat_validity *sv, const char *path);
  */
 void stat_validity_update(struct stat_validity *sv, int fd);
 
-int versioncmp(const char *s1, const char *s2);
-
 #endif /* CACHE_H */
index 57a5884aec787bdf12402b46c2b7bc77349d92a8..5387f79be6d2636fbaeb634cbfce1524e69d9ccc 100644 (file)
@@ -19,6 +19,7 @@
 #include "revision.h"
 #include "utf8.h"
 #include "version.h"
+#include "versioncmp.h"
 #include "trailer.h"
 #include "wt-status.h"
 #include "commit-slab.h"
index 069ee94a4d79422ea659a7ebe3923662f0626afa..9b21ec142dd4af440c1e126c49b2154a5128a52e 100644 (file)
@@ -1,6 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "config.h"
 #include "string-list.h"
+#include "versioncmp.h"
 
 /*
  * versioncmp(): copied from string/strverscmp.c in glibc commit
diff --git a/versioncmp.h b/versioncmp.h
new file mode 100644 (file)
index 0000000..879b510
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef VERSIONCMP_H
+#define VERSIONCMP_H
+
+int versioncmp(const char *s1, const char *s2);
+
+#endif /* VERSIONCMP_H */