]> git.ipfire.org Git - thirdparty/git.git/commitdiff
mailmap, quote: move declarations of global vars to correct unit
authorElijah Newren <newren@gmail.com>
Tue, 11 Apr 2023 07:42:04 +0000 (00:42 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 Apr 2023 15:52:11 +0000 (08:52 -0700)
Since earlier commits removed the inclusion of cache.h from mailmap.c
and quote.c, it feels odd to have the extern declarations of
global variables in cache.h rather than the actual header included
by the source file.  Move these global variable extern declarations
from cache.h to mailmap.c and quote.c.

Signed-off-by: Elijah Newren <newren@gmail.com>
Acked-by: Calvin Wan <calvinwan@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
config.c
mailmap.h
quote.h

diff --git a/cache.h b/cache.h
index 16b5fc9fa31fd405f4df190cfe10d2e1f77388ba..2f21704da9e1d03a60e1fa8a655b29b48c338463 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -599,8 +599,6 @@ void set_alternate_index_output(const char *);
 extern int verify_index_checksum;
 extern int verify_ce_order;
 
-extern int quote_path_fully;
-
 #define MTIME_CHANGED  0x0001
 #define CTIME_CHANGED  0x0002
 #define OWNER_CHANGED  0x0004
@@ -655,9 +653,6 @@ struct pack_entry {
 /* Dumb servers support */
 int update_server_info(int);
 
-extern const char *git_mailmap_file;
-extern const char *git_mailmap_blob;
-
 #define COPY_READ_ERROR (-2)
 #define COPY_WRITE_ERROR (-3)
 int copy_fd(int ifd, int ofd);
index 11e3295419b752ca579967377bbb2a018aa4302f..9beba19b41ce215478d2f4838ff74611260913f7 100644 (file)
--- a/config.c
+++ b/config.c
@@ -18,6 +18,7 @@
 #include "ident.h"
 #include "repository.h"
 #include "lockfile.h"
+#include "mailmap.h"
 #include "exec-cmd.h"
 #include "strbuf.h"
 #include "quote.h"
index 7e99fccb46c92e012fa32fafb6ed27c217fdcc4d..0f8fd2c586feaccd4bb4df772b8e8393148ccf6c 100644 (file)
--- a/mailmap.h
+++ b/mailmap.h
@@ -3,6 +3,9 @@
 
 struct string_list;
 
+extern const char *git_mailmap_file;
+extern const char *git_mailmap_blob;
+
 int read_mailmap(struct string_list *map);
 void clear_mailmap(struct string_list *map);
 
diff --git a/quote.h b/quote.h
index 87ff458b06dd6430855b39f6cb4833664e630746..0300c291041b02464e55e36a6c820a9faecf260f 100644 (file)
--- a/quote.h
+++ b/quote.h
@@ -3,6 +3,8 @@
 
 struct strbuf;
 
+extern int quote_path_fully;
+
 /* Help to copy the thing properly quoted for the shell safety.
  * any single quote is replaced with '\'', any exclamation point
  * is replaced with '\!', and the whole thing is enclosed in a