diff mbox series

[11/23] versioncmp.h: move declarations for versioncmp.c functions from cache.h

Message ID 07e5da241dc2cb6cf6cc6de1051a2ee490bf26c2.1681614206.git.gitgitgadget@gmail.com (mailing list archive)
State Accepted
Commit 3467663d47a56f9debd86cae75963eee023b3b89
Headers show
Series Header cleanups (more splitting of cache.h and simplifying a few other deps) | expand

Commit Message

Elijah Newren April 16, 2023, 3:03 a.m. UTC
From: Elijah Newren <newren@gmail.com>

Signed-off-by: Elijah Newren <newren@gmail.com>
---
 cache.h      | 2 --
 ref-filter.c | 1 +
 versioncmp.c | 3 ++-
 versioncmp.h | 6 ++++++
 4 files changed, 9 insertions(+), 3 deletions(-)
 create mode 100644 versioncmp.h
diff mbox series

Patch

diff --git a/cache.h b/cache.h
index dde275c9301..6955745cccd 100644
--- 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 */
diff --git a/ref-filter.c b/ref-filter.c
index 57a5884aec7..5387f79be6d 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -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"
diff --git a/versioncmp.c b/versioncmp.c
index 069ee94a4d7..9b21ec142dd 100644
--- a/versioncmp.c
+++ b/versioncmp.c
@@ -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
index 00000000000..879b510e82a
--- /dev/null
+++ b/versioncmp.h
@@ -0,0 +1,6 @@ 
+#ifndef VERSIONCMP_H
+#define VERSIONCMP_H
+
+int versioncmp(const char *s1, const char *s2);
+
+#endif /* VERSIONCMP_H */