Skip to content

Commit 4711556

Browse files
newrengitster
authored andcommitted
mailmap, quote: move declarations of global vars to correct unit
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 <[email protected]> Acked-by: Calvin Wan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b7b189c commit 4711556

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

cache.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,6 @@ void set_alternate_index_output(const char *);
599599
extern int verify_index_checksum;
600600
extern int verify_ce_order;
601601

602-
extern int quote_path_fully;
603-
604602
#define MTIME_CHANGED 0x0001
605603
#define CTIME_CHANGED 0x0002
606604
#define OWNER_CHANGED 0x0004
@@ -655,9 +653,6 @@ struct pack_entry {
655653
/* Dumb servers support */
656654
int update_server_info(int);
657655

658-
extern const char *git_mailmap_file;
659-
extern const char *git_mailmap_blob;
660-
661656
#define COPY_READ_ERROR (-2)
662657
#define COPY_WRITE_ERROR (-3)
663658
int copy_fd(int ifd, int ofd);

config.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "ident.h"
1919
#include "repository.h"
2020
#include "lockfile.h"
21+
#include "mailmap.h"
2122
#include "exec-cmd.h"
2223
#include "strbuf.h"
2324
#include "quote.h"

mailmap.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
struct string_list;
55

6+
extern const char *git_mailmap_file;
7+
extern const char *git_mailmap_blob;
8+
69
int read_mailmap(struct string_list *map);
710
void clear_mailmap(struct string_list *map);
811

quote.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
struct strbuf;
55

6+
extern int quote_path_fully;
7+
68
/* Help to copy the thing properly quoted for the shell safety.
79
* any single quote is replaced with '\'', any exclamation point
810
* is replaced with '\!', and the whole thing is enclosed in a

0 commit comments

Comments
 (0)