copy.h: move declarations for copy.c functions from cache.h
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Apr 22, 2023 at 20:17 UTC
d5fff46f4025e23ec61b9d74eac2bb19e7a2385d
14 files changed
+22
-6
builtin/bisect.c
+1
@@ -1,5 +1,6 @@
1
#include "builtin.h"
2
#include "cache.h"
3
+#include "copy.h"
4
#include "environment.h"
5
#include "gettext.h"
6
#include "hex.h"
builtin/clone.c
+1
@@ -13,6 +13,7 @@
13
#include "abspath.h"
14
#include "advice.h"
15
#include "config.h"
16
+#include "copy.h"
17
#include "environment.h"
18
#include "gettext.h"
19
#include "hex.h"
builtin/difftool.c
+1
@@ -15,6 +15,7 @@
15
#include "cache.h"
16
#include "abspath.h"
17
#include "config.h"
18
+#include "copy.h"
19
#include "builtin.h"
20
#include "run-command.h"
21
#include "environment.h"
builtin/init-db.c
+1
@@ -6,6 +6,7 @@
6
#include "cache.h"
7
#include "abspath.h"
8
#include "config.h"
9
+#include "copy.h"
10
#include "environment.h"
11
#include "gettext.h"
12
#include "refs.h"
builtin/worktree.c
+1
@@ -2,6 +2,7 @@
2
#include "abspath.h"
3
#include "checkout.h"
4
#include "config.h"
5
+#include "copy.h"
6
#include "builtin.h"
7
#include "dir.h"
8
#include "environment.h"
bundle-uri.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "bundle-uri.h"
3
#include "bundle.h"
4
+#include "copy.h"
5
#include "environment.h"
6
#include "gettext.h"
7
#include "object-store.h"
cache.h
-6
@@ -593,12 +593,6 @@ int df_name_compare(const char *name1, size_t len1, int mode1,
593
int name_compare(const char *name1, size_t len1, const char *name2, size_t len2);
594
int cache_name_stage_compare(const char *name1, int len1, int stage1, const char *name2, int len2, int stage2);
595
596
-#define COPY_READ_ERROR (-2)
597
-#define COPY_WRITE_ERROR (-3)
598
-int copy_fd(int ifd, int ofd);
599
-int copy_file(const char *dst, const char *src, int mode);
600
-int copy_file_with_time(const char *dst, const char *src, int mode);
601
-
596
/* base85 */
597
int decode_85(char *dst, const char *line, int linelen);
598
void encode_85(char *buf, const unsigned char *data, int bytes);
convert.c
+1
@@ -2,6 +2,7 @@
2
#include "advice.h"
3
#include "config.h"
4
#include "convert.h"
5
+#include "copy.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "object-store.h"
copy.c
+1
@@ -1,4 +1,5 @@
1
#include "cache.h"
2
+#include "copy.h"
3
#include "wrapper.h"
4
5
int copy_fd(int ifd, int ofd)
copy.h
new
+10
@@ -0,0 +1,10 @@
1
+#ifndef COPY_H
2
+#define COPY_H
3
+
4
+#define COPY_READ_ERROR (-2)
5
+#define COPY_WRITE_ERROR (-3)
6
+int copy_fd(int ifd, int ofd);
7
+int copy_file(const char *dst, const char *src, int mode);
8
+int copy_file_with_time(const char *dst, const char *src, int mode);
9
+
10
+#endif /* COPY_H */
pkt-line.c
+1
@@ -1,4 +1,5 @@
1
#include "cache.h"
2
+#include "copy.h"
3
#include "pkt-line.h"
4
#include "gettext.h"
5
#include "hex.h"
refs/files-backend.c
+1
@@ -1,5 +1,6 @@
1
#include "../cache.h"
2
#include "../config.h"
3
+#include "../copy.h"
4
#include "../environment.h"
5
#include "../gettext.h"
6
#include "../hex.h"
rerere.c
+1
@@ -2,6 +2,7 @@
2
#include "abspath.h"
3
#include "alloc.h"
4
#include "config.h"
5
+#include "copy.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "lockfile.h"
sequencer.c
+1
@@ -3,6 +3,7 @@
3
#include "advice.h"
4
#include "alloc.h"
5
#include "config.h"
6
+#include "copy.h"
7
#include "environment.h"
8
#include "gettext.h"
9
#include "hex.h"