Skip to content

Commit d5ebb50

Browse files
newrengitster
authored andcommitted
wrapper.h: move declarations for wrapper.c functions from cache.h
Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 905f969 commit d5ebb50

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+103
-34
lines changed

apply.c

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "rerere.h"
2727
#include "apply.h"
2828
#include "entry.h"
29+
#include "wrapper.h"
2930

3031
struct gitdiff_data {
3132
struct strbuf *root;

builtin/am.c

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "packfile.h"
3939
#include "repository.h"
4040
#include "pretty.h"
41+
#include "wrapper.h"
4142

4243
/**
4344
* Returns the length of the first line of msg.

builtin/bisect.c

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "prompt.h"
1212
#include "quote.h"
1313
#include "revision.h"
14+
#include "wrapper.h"
1415

1516
static GIT_PATH_FUNC(git_path_bisect_terms, "BISECT_TERMS")
1617
static GIT_PATH_FUNC(git_path_bisect_expected_rev, "BISECT_EXPECTED_REV")

builtin/branch.c

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "worktree.h"
2727
#include "help.h"
2828
#include "commit-reach.h"
29+
#include "wrapper.h"
2930

3031
static const char * const builtin_branch_usage[] = {
3132
N_("git branch [<options>] [-r | -a] [--merged] [--no-merged]"),

builtin/bugreport.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "hook.h"
99
#include "hook-list.h"
1010
#include "diagnose.h"
11-
11+
#include "wrapper.h"
1212

1313
static void get_system_info(struct strbuf *sys_info)
1414
{

builtin/config.c

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "urlmatch.h"
1010
#include "quote.h"
1111
#include "worktree.h"
12+
#include "wrapper.h"
1213

1314
static const char *const builtin_config_usage[] = {
1415
N_("git config [<options>]"),

builtin/credential-cache.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "builtin.h"
22
#include "gettext.h"
33
#include "parse-options.h"
4+
#include "wrapper.h"
45

56
#ifndef NO_UNIX_SOCKETS
67

builtin/difftool.c

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "object-store.h"
2828
#include "dir.h"
2929
#include "entry.h"
30+
#include "wrapper.h"
3031

3132
static int trust_exit_code;
3233

builtin/fast-import.c

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "commit-reach.h"
2424
#include "khash.h"
2525
#include "date.h"
26+
#include "wrapper.h"
2627

2728
#define PACK_ID_BITS 16
2829
#define MAX_PACK_ID ((1<<PACK_ID_BITS)-1)

builtin/fmt-merge-msg.c

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "fmt-merge-msg.h"
44
#include "gettext.h"
55
#include "parse-options.h"
6+
#include "wrapper.h"
67

78
static const char * const fmt_merge_msg_usage[] = {
89
N_("git fmt-merge-msg [-m <message>] [--log[=<n>] | --no-log] [--file <file>]"),

builtin/gc.c

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "exec-cmd.h"
3636
#include "gettext.h"
3737
#include "hook.h"
38+
#include "wrapper.h"
3839

3940
#define FAILED_RUN "failed to run %s"
4041

builtin/get-tar-commit-id.c

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "tar.h"
77
#include "builtin.h"
88
#include "quote.h"
9+
#include "wrapper.h"
910

1011
static const char builtin_get_tar_commit_id_usage[] =
1112
"git get-tar-commit-id";

builtin/index-pack.c

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "object-store.h"
2020
#include "replace-object.h"
2121
#include "promisor-remote.h"
22+
#include "wrapper.h"
2223

2324
static const char index_pack_usage[] =
2425
"git index-pack [-v] [-o <index-file>] [--keep | --keep=<msg>] [--[no-]rev-index] [--verify] [--strict] (<pack-file> | --stdin [--fix-thin] [<pack-file>])";

builtin/init-db.c

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "exec-cmd.h"
1313
#include "parse-options.h"
1414
#include "worktree.h"
15+
#include "wrapper.h"
1516

1617
#ifndef DEFAULT_GIT_TEMPLATE_DIR
1718
#define DEFAULT_GIT_TEMPLATE_DIR "/usr/share/git-core/templates"

builtin/merge.c

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#include "commit-reach.h"
5050
#include "wt-status.h"
5151
#include "commit-graph.h"
52+
#include "wrapper.h"
5253

5354
#define DEFAULT_TWOHEAD (1<<0)
5455
#define DEFAULT_OCTOPUS (1<<1)

builtin/pack-objects.c

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include "shallow.h"
4141
#include "promisor-remote.h"
4242
#include "pack-mtimes.h"
43+
#include "wrapper.h"
4344

4445
/*
4546
* Objects we are going to pack are collected in the `to_pack` structure.

builtin/rebase.c

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "rebase-interactive.h"
3333
#include "reset.h"
3434
#include "hook.h"
35+
#include "wrapper.h"
3536

3637
static char const * const builtin_rebase_usage[] = {
3738
N_("git rebase [-i] [options] [--exec <cmd>] "

builtin/receive-pack.c

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "commit-reach.h"
3434
#include "worktree.h"
3535
#include "shallow.h"
36+
#include "wrapper.h"
3637

3738
static const char * const receive_pack_usage[] = {
3839
N_("git receive-pack <git-dir>"),

builtin/rerere.c

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "parse-options.h"
77
#include "string-list.h"
88
#include "rerere.h"
9+
#include "wrapper.h"
910
#include "xdiff/xdiff.h"
1011
#include "xdiff-interface.h"
1112
#include "pathspec.h"

builtin/unpack-file.c

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "config.h"
33
#include "hex.h"
44
#include "object-store.h"
5+
#include "wrapper.h"
56

67
static char *create_temp_file(struct object_id *oid)
78
{

builtin/worktree.c

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "submodule.h"
1717
#include "utf8.h"
1818
#include "worktree.h"
19+
#include "wrapper.h"
1920
#include "quote.h"
2021

2122
#define BUILTIN_WORKTREE_ADD_USAGE \

cache.h

-32
Original file line numberDiff line numberDiff line change
@@ -1085,10 +1085,6 @@ const char *repo_find_unique_abbrev(struct repository *r, const struct object_id
10851085
int repo_find_unique_abbrev_r(struct repository *r, char *hex, const struct object_id *oid, int len);
10861086
#define find_unique_abbrev_r(hex, oid, len) repo_find_unique_abbrev_r(the_repository, hex, oid, len)
10871087

1088-
/* set default permissions by passing mode arguments to open(2) */
1089-
int git_mkstemps_mode(char *pattern, int suffix_len, int mode);
1090-
int git_mkstemp_mode(char *pattern, int mode);
1091-
10921088
/*
10931089
* NOTE NOTE NOTE!!
10941090
*
@@ -1423,31 +1419,6 @@ static inline int batch_fsync_enabled(enum fsync_component component)
14231419
return (fsync_components & component) && (fsync_method == FSYNC_METHOD_BATCH);
14241420
}
14251421

1426-
ssize_t read_in_full(int fd, void *buf, size_t count);
1427-
ssize_t write_in_full(int fd, const void *buf, size_t count);
1428-
ssize_t pread_in_full(int fd, void *buf, size_t count, off_t offset);
1429-
1430-
static inline ssize_t write_str_in_full(int fd, const char *str)
1431-
{
1432-
return write_in_full(fd, str, strlen(str));
1433-
}
1434-
1435-
/**
1436-
* Open (and truncate) the file at path, write the contents of buf to it,
1437-
* and close it. Dies if any errors are encountered.
1438-
*/
1439-
void write_file_buf(const char *path, const char *buf, size_t len);
1440-
1441-
/**
1442-
* Like write_file_buf(), but format the contents into a buffer first.
1443-
* Additionally, write_file() will append a newline if one is not already
1444-
* present, making it convenient to write text files:
1445-
*
1446-
* write_file(path, "counter: %d", ctr);
1447-
*/
1448-
__attribute__((format (printf, 2, 3)))
1449-
void write_file(const char *path, const char *fmt, ...);
1450-
14511422
/* pager.c */
14521423
void setup_pager(void);
14531424
int pager_in_use(void);
@@ -1571,7 +1542,4 @@ int versioncmp(const char *s1, const char *s2);
15711542
*/
15721543
int print_sha1_ellipsis(void);
15731544

1574-
/* Return 1 if the file is empty or does not exists, 0 otherwise. */
1575-
int is_empty_or_missing_file(const char *filename);
1576-
15771545
#endif /* CACHE_H */

commit-graph.c

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "json-writer.h"
2323
#include "trace2.h"
2424
#include "chunk-format.h"
25+
#include "wrapper.h"
2526

2627
void git_test_write_commit_graph_or_die(void)
2728
{

compat/mingw.c

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "../alloc.h"
1212
#include "win32/lazyload.h"
1313
#include "../config.h"
14+
#include "../wrapper.h"
1415
#include "dir.h"
1516
#include "gettext.h"
1617
#define SECURITY_WIN32

compat/terminal.c

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "run-command.h"
77
#include "string-list.h"
88
#include "hashmap.h"
9+
#include "wrapper.h"
910

1011
#if defined(HAVE_DEV_TTY) || defined(GIT_WINDOWS_NATIVE)
1112

config.c

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "replace-object.h"
2929
#include "refs.h"
3030
#include "worktree.h"
31+
#include "wrapper.h"
3132

3233
struct config_source {
3334
struct config_source *prev;

convert.c

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "sub-process.h"
1212
#include "utf8.h"
1313
#include "ll-merge.h"
14+
#include "wrapper.h"
1415

1516
/*
1617
* convert.c - convert a file when checking it out and checking it in.

copy.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "cache.h"
2+
#include "wrapper.h"
23

34
int copy_fd(int ifd, int ofd)
45
{

csum-file.c

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "cache.h"
1111
#include "progress.h"
1212
#include "csum-file.h"
13+
#include "wrapper.h"
1314

1415
static void verify_buffer_or_die(struct hashfile *f,
1516
const void *buf,

daemon.c

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "run-command.h"
77
#include "strbuf.h"
88
#include "string-list.h"
9+
#include "wrapper.h"
910

1011
#ifdef NO_INITGROUPS
1112
#define initgroups(x, y) (0) /* nothing */

diff.c

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "promisor-remote.h"
3434
#include "dir.h"
3535
#include "strmap.h"
36+
#include "wrapper.h"
3637

3738
#ifdef NO_FAST_WORKING_DIRECTORY
3839
#define FAST_WORKING_DIRECTORY 0

dir.c

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "ewah/ewok.h"
2222
#include "fsmonitor.h"
2323
#include "submodule-config.h"
24+
#include "wrapper.h"
2425

2526
/*
2627
* Tells read_directory_recursive how a file or directory should be treated.

entry.c

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "fsmonitor.h"
1111
#include "entry.h"
1212
#include "parallel-checkout.h"
13+
#include "wrapper.h"
1314

1415
static void create_directories(const char *path, int path_len,
1516
const struct checkout *state)

environment.c

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "tmp-objdir.h"
2424
#include "chdir-notify.h"
2525
#include "shallow.h"
26+
#include "wrapper.h"
2627

2728
int trust_executable_bit = 1;
2829
int trust_ctime = 1;

fetch-pack.c

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "commit-graph.h"
3131
#include "sigchain.h"
3232
#include "mergesort.h"
33+
#include "wrapper.h"
3334

3435
static int transfer_unpack_limit = -1;
3536
static int fetch_unpack_limit = -1;

gpg-interface.c

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "sigchain.h"
1111
#include "tempfile.h"
1212
#include "alias.h"
13+
#include "wrapper.h"
1314

1415
static int git_gpg_config(const char *, const char *, void *);
1516

http-backend.c

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "object-store.h"
1717
#include "protocol.h"
1818
#include "date.h"
19+
#include "wrapper.h"
1920

2021
static const char content_type[] = "Content-Type";
2122
static const char content_length[] = "Content-Length";

imap-send.c

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "gettext.h"
2929
#include "run-command.h"
3030
#include "parse-options.h"
31+
#include "wrapper.h"
3132
#if defined(NO_OPENSSL) && !defined(HAVE_OPENSSL_CSPRNG)
3233
typedef void *SSL;
3334
#endif

ll-merge.c

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "run-command.h"
1212
#include "ll-merge.h"
1313
#include "quote.h"
14+
#include "wrapper.h"
1415

1516
struct ll_merge_driver;
1617

merge-recursive.c

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "tag.h"
3131
#include "tree-walk.h"
3232
#include "unpack-trees.h"
33+
#include "wrapper.h"
3334
#include "xdiff-interface.h"
3435

3536
struct merge_options_internal {

notes-merge.c

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "strbuf.h"
1616
#include "notes-utils.h"
1717
#include "commit-reach.h"
18+
#include "wrapper.h"
1819

1920
struct notes_merge_pair {
2021
struct object_id obj, base, local, remote;

object-file.c

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "promisor-remote.h"
3939
#include "submodule.h"
4040
#include "fsck.h"
41+
#include "wrapper.h"
4142

4243
/* The maximum size for an object header. */
4344
#define MAX_HEADER_LEN 32

packfile.c

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "midx.h"
2121
#include "commit-graph.h"
2222
#include "promisor-remote.h"
23+
#include "wrapper.h"
2324

2425
char *odb_pack_name(struct strbuf *buf,
2526
const unsigned char *hash,

parallel-checkout.c

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "streaming.h"
1313
#include "thread-utils.h"
1414
#include "trace2.h"
15+
#include "wrapper.h"
1516

1617
struct pc_worker {
1718
struct child_process cp;

0 commit comments

Comments
 (0)