]> git.ipfire.org Git - thirdparty/git.git/commitdiff
copy.h: move declarations for copy.c functions from cache.h
authorElijah Newren <newren@gmail.com>
Sat, 22 Apr 2023 20:17:12 +0000 (20:17 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Apr 2023 19:47:31 +0000 (12:47 -0700)
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 files changed:
builtin/bisect.c
builtin/clone.c
builtin/difftool.c
builtin/init-db.c
builtin/worktree.c
bundle-uri.c
cache.h
convert.c
copy.c
copy.h [new file with mode: 0644]
pkt-line.c
refs/files-backend.c
rerere.c
sequencer.c

index 4b2143d4557a8de9007b4885866c1d4ca9668cc8..4812450c393da3e2df36521c5f0295ad48e65fe2 100644 (file)
@@ -1,5 +1,6 @@
 #include "builtin.h"
 #include "cache.h"
+#include "copy.h"
 #include "environment.h"
 #include "gettext.h"
 #include "hex.h"
index 4ed0a1d5aad97a78a32ee26158ba8ad6cbbaa6a3..017ebc3faa8adc55e34edadd283edaaa1abaabae 100644 (file)
@@ -13,6 +13,7 @@
 #include "abspath.h"
 #include "advice.h"
 #include "config.h"
+#include "copy.h"
 #include "environment.h"
 #include "gettext.h"
 #include "hex.h"
index 3ffb0524be76bb9bd258f9eeef12280fcbfed266..409507983f222be6ac0a0c81fd2b8b0a185271ab 100644 (file)
@@ -15,6 +15,7 @@
 #include "cache.h"
 #include "abspath.h"
 #include "config.h"
+#include "copy.h"
 #include "builtin.h"
 #include "run-command.h"
 #include "environment.h"
index 6183f3fb3ffabba2485374da44ca4d5a1e732f13..cda6ee75eb5fa3fc9fa8013eaaddea53a761651a 100644 (file)
@@ -6,6 +6,7 @@
 #include "cache.h"
 #include "abspath.h"
 #include "config.h"
+#include "copy.h"
 #include "environment.h"
 #include "gettext.h"
 #include "refs.h"
index 0621f6f708e93bdb8cde70eded330c84755a1e4f..0b411e9deee5fc0f3661634224ca05863dda7913 100644 (file)
@@ -2,6 +2,7 @@
 #include "abspath.h"
 #include "checkout.h"
 #include "config.h"
+#include "copy.h"
 #include "builtin.h"
 #include "dir.h"
 #include "environment.h"
index 1ff1cf51dad3da212b2d01e2ed1d1355ac40434f..6d44662ee1f52f7f3f78156bae1da56b541205db 100644 (file)
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "bundle-uri.h"
 #include "bundle.h"
+#include "copy.h"
 #include "environment.h"
 #include "gettext.h"
 #include "object-store.h"
diff --git a/cache.h b/cache.h
index 2eb4546473f5dea023c6390375282bf679b7926c..2b6617647945e1c6663063253b9783936090535f 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -593,12 +593,6 @@ int df_name_compare(const char *name1, size_t len1, int mode1,
 int name_compare(const char *name1, size_t len1, const char *name2, size_t len2);
 int cache_name_stage_compare(const char *name1, int len1, int stage1, const char *name2, int len2, int stage2);
 
-#define COPY_READ_ERROR (-2)
-#define COPY_WRITE_ERROR (-3)
-int copy_fd(int ifd, int ofd);
-int copy_file(const char *dst, const char *src, int mode);
-int copy_file_with_time(const char *dst, const char *src, int mode);
-
 /* base85 */
 int decode_85(char *dst, const char *line, int linelen);
 void encode_85(char *buf, const unsigned char *data, int bytes);
index 5a2ea5308d6b1467b1ac1925507b1dacc5d809e4..7cf7bd0c883ded1f50a0f57ce3a8f19d05752667 100644 (file)
--- a/convert.c
+++ b/convert.c
@@ -2,6 +2,7 @@
 #include "advice.h"
 #include "config.h"
 #include "convert.h"
+#include "copy.h"
 #include "gettext.h"
 #include "hex.h"
 #include "object-store.h"
diff --git a/copy.c b/copy.c
index c3250f08221b338e3843f5aa72f42f973beb1a38..db6b615c18854a007473d0e978b63a71c5f3933e 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "copy.h"
 #include "wrapper.h"
 
 int copy_fd(int ifd, int ofd)
diff --git a/copy.h b/copy.h
new file mode 100644 (file)
index 0000000..2af77cb
--- /dev/null
+++ b/copy.h
@@ -0,0 +1,10 @@
+#ifndef COPY_H
+#define COPY_H
+
+#define COPY_READ_ERROR (-2)
+#define COPY_WRITE_ERROR (-3)
+int copy_fd(int ifd, int ofd);
+int copy_file(const char *dst, const char *src, int mode);
+int copy_file_with_time(const char *dst, const char *src, int mode);
+
+#endif /* COPY_H */
index 3561d853584ecd1611acfe2358cfaa7adb9b5cd2..8b5fa788517056b3f22e981fa60b24e94b36e33b 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "copy.h"
 #include "pkt-line.h"
 #include "gettext.h"
 #include "hex.h"
index d0581ee41ac6181961567627f292ad6a0dbcdc14..1128a9af2920516677420c40575af4f0de71f4da 100644 (file)
@@ -1,5 +1,6 @@
 #include "../cache.h"
 #include "../config.h"
+#include "../copy.h"
 #include "../environment.h"
 #include "../gettext.h"
 #include "../hex.h"
index 7abc94bf444dc18fe0eb4d170845bf54c9a7370e..e968d413d65bd63ef8cc03285d51049505104482 100644 (file)
--- a/rerere.c
+++ b/rerere.c
@@ -2,6 +2,7 @@
 #include "abspath.h"
 #include "alloc.h"
 #include "config.h"
+#include "copy.h"
 #include "gettext.h"
 #include "hex.h"
 #include "lockfile.h"
index fcca3b81447086518f0f131dd31dd5aee5da2110..c16df51443446309bb536057ff0fea9c7cf00d8a 100644 (file)
@@ -3,6 +3,7 @@
 #include "advice.h"
 #include "alloc.h"
 #include "config.h"
+#include "copy.h"
 #include "environment.h"
 #include "gettext.h"
 #include "hex.h"