Commit 55454427 authored by Denton Liu's avatar Denton Liu Committed by Junio C Hamano

*.[ch]: remove extern from function declarations using spatch

There has been a push to remove extern from function declarations.
Remove some instances of "extern" for function declarations which are
caught by Coccinelle. Note that Coccinelle has some difficulty with
processing functions with `__attribute__` or varargs so some `extern`
declarations are left behind to be dealt with in a future patch.

This was the Coccinelle patch used:

	@@
	type T;
	identifier f;
	@@
	- extern
	  T f(...);

and it was run with:

	$ git ls-files \*.{c,h} |
		grep -v ^compat/ |
		xargs spatch --sp-file contrib/coccinelle/noextern.cocci --in-place

Files under `compat/` are intentionally excluded as some are directly
copied from external sources and we should avoid churning them as much
as possible.
Signed-off-by: Denton Liu's avatarDenton Liu <liu.denton@gmail.com>
Signed-off-by: 's avatarJunio C Hamano <gitster@pobox.com>
parent ffac537e
......@@ -31,7 +31,7 @@ int git_default_advice_config(const char *var, const char *value);
__attribute__((format (printf, 1, 2)))
void advise(const char *advice, ...);
int error_resolve_conflict(const char *me);
extern void NORETURN die_resolve_conflict(const char *me);
void NORETURN die_resolve_conflict(const char *me);
void NORETURN die_conclude_merge(void);
void detach_advice(const char *new_name);
......
......@@ -23,7 +23,7 @@ struct archiver_args {
/* main api */
extern int write_archive(int argc, const char **argv, const char *prefix,
int write_archive(int argc, const char **argv, const char *prefix,
struct repository *repo,
const char *name_hint, int remote);
......@@ -39,19 +39,19 @@ struct archiver {
unsigned flags;
void *data;
};
extern void register_archiver(struct archiver *);
void register_archiver(struct archiver *);
extern void init_tar_archiver(void);
extern void init_zip_archiver(void);
extern void init_archivers(void);
void init_tar_archiver(void);
void init_zip_archiver(void);
void init_archivers(void);
typedef int (*write_archive_entry_fn_t)(struct archiver_args *args,
const struct object_id *oid,
const char *path, size_t pathlen,
unsigned int mode);
extern int write_archive_entries(struct archiver_args *args, write_archive_entry_fn_t write_entry);
extern void *object_file_to_archive(const struct archiver_args *args,
int write_archive_entries(struct archiver_args *args, write_archive_entry_fn_t write_entry);
void *object_file_to_archive(const struct archiver_args *args,
const char *path, const struct object_id *oid,
unsigned int mode, enum object_type *type,
unsigned long *sizep);
......
......@@ -11,10 +11,10 @@ struct repository;
* Otherwise, it will be either all non-SAMETREE commits or the single
* best commit, as chosen by `find_all`.
*/
extern void find_bisection(struct commit_list **list, int *reaches, int *all,
void find_bisection(struct commit_list **list, int *reaches, int *all,
int find_all);
extern struct commit_list *filter_skipped(struct commit_list *list,
struct commit_list *filter_skipped(struct commit_list *list,
struct commit_list **tried,
int show_all,
int *count,
......@@ -31,14 +31,14 @@ struct rev_list_info {
const char *header_prefix;
};
extern int bisect_next_all(struct repository *r,
int bisect_next_all(struct repository *r,
const char *prefix,
int no_checkout);
extern int estimate_bisect_steps(int all);
int estimate_bisect_steps(int all);
extern void read_bisect_terms(const char **bad, const char **good);
void read_bisect_terms(const char **bad, const char **good);
extern int bisect_clean_state(void);
int bisect_clean_state(void);
#endif
......@@ -177,6 +177,6 @@ struct blame_entry *blame_entry_prepend(struct blame_entry *head,
long start, long end,
struct blame_origin *o);
extern struct blame_origin *get_blame_suspects(struct commit *commit);
struct blame_origin *get_blame_suspects(struct commit *commit);
#endif /* BLAME_H */
......@@ -50,7 +50,7 @@ void create_branch(struct repository *r,
* Return 1 if the named branch already exists; return 0 otherwise.
* Fill ref with the full refname for the branch.
*/
extern int validate_branchname(const char *name, struct strbuf *ref);
int validate_branchname(const char *name, struct strbuf *ref);
/*
* Check if a branch 'name' can be created as a new branch; die otherwise.
......@@ -58,7 +58,7 @@ extern int validate_branchname(const char *name, struct strbuf *ref);
* Return 1 if the named branch already exists; return 0 otherwise.
* Fill ref with the full refname for the branch.
*/
extern int validate_new_branchname(const char *name, struct strbuf *ref, int force);
int validate_new_branchname(const char *name, struct strbuf *ref, int force);
/*
* Remove information about the state of working on the current
......@@ -72,26 +72,26 @@ void remove_branch_state(struct repository *r);
* Returns 0 on success.
*/
#define BRANCH_CONFIG_VERBOSE 01
extern int install_branch_config(int flag, const char *local, const char *origin, const char *remote);
int install_branch_config(int flag, const char *local, const char *origin, const char *remote);
/*
* Read branch description
*/
extern int read_branch_desc(struct strbuf *, const char *branch_name);
int read_branch_desc(struct strbuf *, const char *branch_name);
/*
* Check if a branch is checked out in the main worktree or any linked
* worktree and die (with a message describing its checkout location) if
* it is.
*/
extern void die_if_checked_out(const char *branch, int ignore_current_worktree);
void die_if_checked_out(const char *branch, int ignore_current_worktree);
/*
* Update all per-worktree HEADs pointing at the old ref to point the new ref.
* This will be used when renaming a branch. Returns 0 if successful, non-zero
* otherwise.
*/
extern int replace_each_worktree_head_symref(const char *oldref, const char *newref,
int replace_each_worktree_head_symref(const char *oldref, const char *newref,
const char *logmsg);
#endif
This diff is collapsed.
......@@ -6,11 +6,11 @@
#include "cache.h"
extern int index_bulk_checkin(struct object_id *oid,
int index_bulk_checkin(struct object_id *oid,
int fd, size_t size, enum object_type type,
const char *path, unsigned flags);
extern void plug_bulk_checkin(void);
extern void unplug_bulk_checkin(void);
void plug_bulk_checkin(void);
void unplug_bulk_checkin(void);
#endif
This diff is collapsed.
......@@ -8,7 +8,7 @@
* tracking branch. Return the name of the remote if such a branch
* exists, NULL otherwise.
*/
extern const char *unique_tracking_name(const char *name,
const char *unique_tracking_name(const char *name,
struct object_id *oid,
int *dwim_remotes_matched);
......
......@@ -27,20 +27,20 @@ struct column_options {
};
struct option;
extern int parseopt_column_callback(const struct option *, const char *, int);
extern int git_column_config(const char *var, const char *value,
int parseopt_column_callback(const struct option *, const char *, int);
int git_column_config(const char *var, const char *value,
const char *command, unsigned int *colopts);
extern int finalize_colopts(unsigned int *colopts, int stdout_is_tty);
int finalize_colopts(unsigned int *colopts, int stdout_is_tty);
static inline int column_active(unsigned int colopts)
{
return (colopts & COL_ENABLE_MASK) == COL_ENABLED;
}
struct string_list;
extern void print_columns(const struct string_list *list, unsigned int colopts,
void print_columns(const struct string_list *list, unsigned int colopts,
const struct column_options *opts);
extern int run_column_filter(int colopts, const struct column_options *);
extern int stop_column_filter(void);
int run_column_filter(int colopts, const struct column_options *);
int stop_column_filter(void);
#endif
......@@ -177,8 +177,8 @@ void free_commit_list(struct commit_list *list);
struct rev_info; /* in revision.h, it circularly uses enum cmit_fmt */
extern int has_non_ascii(const char *text);
extern const char *logmsg_reencode(const struct commit *commit,
int has_non_ascii(const char *text);
const char *logmsg_reencode(const struct commit *commit,
char **commit_encoding,
const char *output_encoding);
const char *repo_logmsg_reencode(struct repository *r,
......@@ -189,7 +189,7 @@ const char *repo_logmsg_reencode(struct repository *r,
#define logmsg_reencode(c, enc, out) repo_logmsg_reencode(the_repository, c, enc, out)
#endif
extern const char *skip_blank_lines(const char *msg);
const char *skip_blank_lines(const char *msg);
/** Removes the first commit from a list sorted by date, and adds all
* of its parents.
......@@ -240,22 +240,22 @@ struct commit *get_fork_point(const char *refname, struct commit *commit);
struct oid_array;
struct ref;
extern int register_shallow(struct repository *r, const struct object_id *oid);
extern int unregister_shallow(const struct object_id *oid);
extern int for_each_commit_graft(each_commit_graft_fn, void *);
extern int is_repository_shallow(struct repository *r);
extern struct commit_list *get_shallow_commits(struct object_array *heads,
int register_shallow(struct repository *r, const struct object_id *oid);
int unregister_shallow(const struct object_id *oid);
int for_each_commit_graft(each_commit_graft_fn, void *);
int is_repository_shallow(struct repository *r);
struct commit_list *get_shallow_commits(struct object_array *heads,
int depth, int shallow_flag, int not_shallow_flag);
extern struct commit_list *get_shallow_commits_by_rev_list(
struct commit_list *get_shallow_commits_by_rev_list(
int ac, const char **av, int shallow_flag, int not_shallow_flag);
extern void set_alternate_shallow_file(struct repository *r, const char *path, int override);
extern int write_shallow_commits(struct strbuf *out, int use_pack_protocol,
void set_alternate_shallow_file(struct repository *r, const char *path, int override);
int write_shallow_commits(struct strbuf *out, int use_pack_protocol,
const struct oid_array *extra);
extern void setup_alternate_shallow(struct lock_file *shallow_lock,
void setup_alternate_shallow(struct lock_file *shallow_lock,
const char **alternate_shallow_file,
const struct oid_array *extra);
extern const char *setup_temporary_shallow(const struct oid_array *extra);
extern void advertise_shallow_grafts(int);
const char *setup_temporary_shallow(const struct oid_array *extra);
void advertise_shallow_grafts(int);
struct shallow_info {
struct oid_array *shallow;
......@@ -272,20 +272,20 @@ struct shallow_info {
int nr_commits;
};
extern void prepare_shallow_info(struct shallow_info *, struct oid_array *);
extern void clear_shallow_info(struct shallow_info *);
extern void remove_nonexistent_theirs_shallow(struct shallow_info *);
extern void assign_shallow_commits_to_refs(struct shallow_info *info,
void prepare_shallow_info(struct shallow_info *, struct oid_array *);
void clear_shallow_info(struct shallow_info *);
void remove_nonexistent_theirs_shallow(struct shallow_info *);
void assign_shallow_commits_to_refs(struct shallow_info *info,
uint32_t **used,
int *ref_status);
extern int delayed_reachability_test(struct shallow_info *si, int c);
int delayed_reachability_test(struct shallow_info *si, int c);
#define PRUNE_SHOW_ONLY 1
#define PRUNE_QUICK 2
extern void prune_shallow(unsigned options);
void prune_shallow(unsigned options);
extern struct trace_key trace_shallow;
extern int interactive_add(int argc, const char **argv, const char *prefix, int patch);
extern int run_add_interactive(const char *revision, const char *patch_mode,
int interactive_add(int argc, const char **argv, const char *prefix, int patch);
int run_add_interactive(const char *revision, const char *patch_mode,
const struct pathspec *pathspec);
struct commit_extra_header {
......@@ -295,24 +295,24 @@ struct commit_extra_header {
size_t len;
};
extern void append_merge_tag_headers(struct commit_list *parents,
void append_merge_tag_headers(struct commit_list *parents,
struct commit_extra_header ***tail);
extern int commit_tree(const char *msg, size_t msg_len,
int commit_tree(const char *msg, size_t msg_len,
const struct object_id *tree,
struct commit_list *parents, struct object_id *ret,
const char *author, const char *sign_commit);
extern int commit_tree_extended(const char *msg, size_t msg_len,
int commit_tree_extended(const char *msg, size_t msg_len,
const struct object_id *tree,
struct commit_list *parents,
struct object_id *ret, const char *author,
const char *sign_commit,
struct commit_extra_header *);
extern struct commit_extra_header *read_commit_extra_headers(struct commit *, const char **);
struct commit_extra_header *read_commit_extra_headers(struct commit *, const char **);
extern void free_commit_extra_headers(struct commit_extra_header *extra);
void free_commit_extra_headers(struct commit_extra_header *extra);
/*
* Search the commit object contents given by "msg" for the header "key".
......@@ -322,23 +322,23 @@ extern void free_commit_extra_headers(struct commit_extra_header *extra);
* Note that some headers (like mergetag) may be multi-line. It is the caller's
* responsibility to parse further in this case!
*/
extern const char *find_commit_header(const char *msg, const char *key,
const char *find_commit_header(const char *msg, const char *key,
size_t *out_len);
/* Find the end of the log message, the right place for a new trailer. */
extern size_t ignore_non_trailer(const char *buf, size_t len);
size_t ignore_non_trailer(const char *buf, size_t len);
typedef int (*each_mergetag_fn)(struct commit *commit, struct commit_extra_header *extra,
void *cb_data);
extern int for_each_mergetag(each_mergetag_fn fn, struct commit *commit, void *data);
int for_each_mergetag(each_mergetag_fn fn, struct commit *commit, void *data);
struct merge_remote_desc {
struct object *obj; /* the named object, could be a tag */
char name[FLEX_ARRAY];
};
extern struct merge_remote_desc *merge_remote_util(struct commit *);
extern void set_merge_remote_desc(struct commit *commit,
struct merge_remote_desc *merge_remote_util(struct commit *);
void set_merge_remote_desc(struct commit *commit,
const char *name, struct object *obj);
/*
......@@ -348,9 +348,9 @@ extern void set_merge_remote_desc(struct commit *commit,
*/
struct commit *get_merge_parent(const char *name);
extern int parse_signed_commit(const struct commit *commit,
int parse_signed_commit(const struct commit *commit,
struct strbuf *message, struct strbuf *signature);
extern int remove_signature(struct strbuf *buf);
int remove_signature(struct strbuf *buf);
/*
* Check the signature of the given commit. The result of the check is stored
......@@ -359,7 +359,7 @@ extern int remove_signature(struct strbuf *buf);
* at all. This may allocate memory for sig->gpg_output, sig->gpg_status,
* sig->signer and sig->key.
*/
extern int check_commit_signature(const struct commit *commit, struct signature_check *sigc);
int check_commit_signature(const struct commit *commit, struct signature_check *sigc);
/* record author-date for each commit object */
struct author_date_slab;
......
This diff is collapsed.
......@@ -7,19 +7,19 @@
#define CONNECT_DIAG_URL (1u << 1)
#define CONNECT_IPV4 (1u << 2)
#define CONNECT_IPV6 (1u << 3)
extern struct child_process *git_connect(int fd[2], const char *url, const char *prog, int flags);
extern int finish_connect(struct child_process *conn);
extern int git_connection_is_socket(struct child_process *conn);
extern int server_supports(const char *feature);
extern int parse_feature_request(const char *features, const char *feature);
extern const char *server_feature_value(const char *feature, int *len_ret);
extern int url_is_local_not_ssh(const char *url);
struct child_process *git_connect(int fd[2], const char *url, const char *prog, int flags);
int finish_connect(struct child_process *conn);
int git_connection_is_socket(struct child_process *conn);
int server_supports(const char *feature);
int parse_feature_request(const char *features, const char *feature);
const char *server_feature_value(const char *feature, int *len_ret);
int url_is_local_not_ssh(const char *url);
struct packet_reader;
extern enum protocol_version discover_version(struct packet_reader *reader);
enum protocol_version discover_version(struct packet_reader *reader);
extern int server_supports_v2(const char *c, int die_on_error);
extern int server_supports_feature(const char *c, const char *feature,
int server_supports_v2(const char *c, int die_on_error);
int server_supports_feature(const char *c, const char *feature,
int die_on_error);
#endif
......@@ -25,22 +25,22 @@ struct hashfile_checkpoint {
git_hash_ctx ctx;
};
extern void hashfile_checkpoint(struct hashfile *, struct hashfile_checkpoint *);
extern int hashfile_truncate(struct hashfile *, struct hashfile_checkpoint *);
void hashfile_checkpoint(struct hashfile *, struct hashfile_checkpoint *);
int hashfile_truncate(struct hashfile *, struct hashfile_checkpoint *);
/* finalize_hashfile flags */
#define CSUM_CLOSE 1
#define CSUM_FSYNC 2
#define CSUM_HASH_IN_STREAM 4
extern struct hashfile *hashfd(int fd, const char *name);
extern struct hashfile *hashfd_check(const char *name);
extern struct hashfile *hashfd_throughput(int fd, const char *name, struct progress *tp);
extern int finalize_hashfile(struct hashfile *, unsigned char *, unsigned int);
extern void hashwrite(struct hashfile *, const void *, unsigned int);
extern void hashflush(struct hashfile *f);
extern void crc32_begin(struct hashfile *);
extern uint32_t crc32_end(struct hashfile *);
struct hashfile *hashfd(int fd, const char *name);
struct hashfile *hashfd_check(const char *name);
struct hashfile *hashfd_throughput(int fd, const char *name, struct progress *tp);
int finalize_hashfile(struct hashfile *, unsigned char *, unsigned int);
void hashwrite(struct hashfile *, const void *, unsigned int);
void hashflush(struct hashfile *f);
void crc32_begin(struct hashfile *);
uint32_t crc32_end(struct hashfile *);
static inline void hashwrite_u8(struct hashfile *f, uint8_t data)
{
......
......@@ -50,12 +50,12 @@ struct decoration {
* NULL), returning the previously associated pointer. If there is no previous
* association, this function returns NULL.
*/
extern void *add_decoration(struct decoration *n, const struct object *obj, void *decoration);
void *add_decoration(struct decoration *n, const struct object *obj, void *decoration);
/*
* Return the pointer associated to the given object. If there is no
* association, this function returns NULL.
*/
extern void *lookup_decoration(struct decoration *n, const struct object *obj);
void *lookup_decoration(struct decoration *n, const struct object *obj);
#endif
......@@ -13,7 +13,7 @@ struct delta_index;
* before free_delta_index() is called. The returned pointer must be freed
* using free_delta_index().
*/
extern struct delta_index *
struct delta_index *
create_delta_index(const void *buf, unsigned long bufsize);
/*
......@@ -21,14 +21,14 @@ create_delta_index(const void *buf, unsigned long bufsize);
*
* Given pointer must be what create_delta_index() returned, or NULL.
*/
extern void free_delta_index(struct delta_index *index);
void free_delta_index(struct delta_index *index);
/*
* sizeof_delta_index: returns memory usage of delta index
*
* Given pointer must be what create_delta_index() returned, or NULL.
*/
extern unsigned long sizeof_delta_index(struct delta_index *index);
unsigned long sizeof_delta_index(struct delta_index *index);
/*
* create_delta: create a delta from given index for the given buffer
......@@ -40,7 +40,7 @@ extern unsigned long sizeof_delta_index(struct delta_index *index);
* returned and *delta_size is updated with its size. The returned buffer
* must be freed by the caller.
*/
extern void *
void *
create_delta(const struct delta_index *index,
const void *buf, unsigned long bufsize,
unsigned long *delta_size, unsigned long max_delta_size);
......@@ -75,7 +75,7 @@ diff_delta(const void *src_buf, unsigned long src_bufsize,
* *trg_bufsize is updated with its size. On failure a NULL pointer is
* returned. The returned buffer must be freed by the caller.
*/
extern void *patch_delta(const void *src_buf, unsigned long src_size,
void *patch_delta(const void *src_buf, unsigned long src_size,
const void *delta_buf, unsigned long delta_size,
unsigned long *dst_size);
......
......@@ -202,7 +202,7 @@ struct dir_struct {
};
/*Count the number of slashes for string s*/
extern int count_slashes(const char *s);
int count_slashes(const char *s);
/*
* The ordering of these constants is significant, with
......@@ -213,24 +213,24 @@ extern int count_slashes(const char *s);
#define MATCHED_RECURSIVELY 1
#define MATCHED_FNMATCH 2
#define MATCHED_EXACTLY 3
extern int simple_length(const char *match);
extern int no_wildcard(const char *string);
extern char *common_prefix(const struct pathspec *pathspec);
extern int match_pathspec(const struct index_state *istate,
int simple_length(const char *match);
int no_wildcard(const char *string);
char *common_prefix(const struct pathspec *pathspec);
int match_pathspec(const struct index_state *istate,
const struct pathspec *pathspec,
const char *name, int namelen,
int prefix, char *seen, int is_dir);
extern int report_path_error(const char *ps_matched, const struct pathspec *pathspec, const char *prefix);
extern int within_depth(const char *name, int namelen, int depth, int max_depth);
int report_path_error(const char *ps_matched, const struct pathspec *pathspec, const char *prefix);
int within_depth(const char *name, int namelen, int depth, int max_depth);
extern int fill_directory(struct dir_struct *dir,
int fill_directory(struct dir_struct *dir,
struct index_state *istate,
const struct pathspec *pathspec);
extern int read_directory(struct dir_struct *, struct index_state *istate,
int read_directory(struct dir_struct *, struct index_state *istate,
const char *path, int len,
const struct pathspec *pathspec);
extern int is_excluded_from_list(const char *pathname, int pathlen,
int is_excluded_from_list(const char *pathname, int pathlen,
const char *basename, int *dtype,
struct exclude_list *el,
struct index_state *istate);
......@@ -242,37 +242,37 @@ struct dir_entry *dir_add_ignored(struct dir_struct *dir,
* these implement the matching logic for dir.c:excluded_from_list and
* attr.c:path_matches()
*/
extern int match_basename(const char *, int,
int match_basename(const char *, int,
const char *, int, int, unsigned);
extern int match_pathname(const char *, int,
int match_pathname(const char *, int,
const char *, int,
const char *, int, int, unsigned);
extern struct exclude *last_exclude_matching(struct dir_struct *dir,
struct exclude *last_exclude_matching(struct dir_struct *dir,
struct index_state *istate,
const char *name, int *dtype);
extern int is_excluded(struct dir_struct *dir,
int is_excluded(struct dir_struct *dir,
struct index_state *istate,
const char *name, int *dtype);
extern struct exclude_list *add_exclude_list(struct dir_struct *dir,
struct exclude_list *add_exclude_list(struct dir_struct *dir,
int group_type, const char *src);
extern int add_excludes_from_file_to_list(const char *fname, const char *base, int baselen,
int add_excludes_from_file_to_list(const char *fname, const char *base, int baselen,
struct exclude_list *el, struct index_state *istate);
extern void add_excludes_from_file(struct dir_struct *, const char *fname);
extern int add_excludes_from_blob_to_list(struct object_id *oid,
void add_excludes_from_file(struct dir_struct *, const char *fname);
int add_excludes_from_blob_to_list(struct object_id *oid,
const char *base, int baselen,
struct exclude_list *el);
extern void parse_exclude_pattern(const char **string, int *patternlen, unsigned *flags, int *nowildcardlen);
extern void add_exclude(const char *string, const char *base,
void parse_exclude_pattern(const char **string, int *patternlen, unsigned *flags, int *nowildcardlen);
void add_exclude(const char *string, const char *base,
int baselen, struct exclude_list *el, int srcpos);
extern void clear_exclude_list(struct exclude_list *el);
extern void clear_directory(struct dir_struct *dir);
extern int file_exists(const char *);
void clear_exclude_list(struct exclude_list *el);
void clear_directory(struct dir_struct *dir);
int file_exists(const char *);
extern int is_inside_dir(const char *dir);
extern int dir_inside_of(const char *subdir, const char *dir);
int is_inside_dir(const char *dir);
int dir_inside_of(const char *subdir, const char *dir);
static inline int is_dot_or_dotdot(const char *name)
{
......@@ -281,9 +281,9 @@ static inline int is_dot_or_dotdot(const char *name)
(name[1] == '.' && name[2] == '\0')));
}
extern int is_empty_dir(const char *dir);
int is_empty_dir(const char *dir);
extern void setup_standard_excludes(struct dir_struct *dir);
void setup_standard_excludes(struct dir_struct *dir);
/* Constants for remove_dir_recursively: */
......@@ -311,23 +311,23 @@ extern void setup_standard_excludes(struct dir_struct *dir);
* This function uses path as temporary scratch space, but restores it
* before returning.
*/
extern int remove_dir_recursively(struct strbuf *path, int flag);
int remove_dir_recursively(struct strbuf *path, int flag);
/* tries to remove the path with empty directories along it, ignores ENOENT */
extern int remove_path(const char *path);
int remove_path(const char *path);
extern int fspathcmp(const char *a, const char *b);
extern int fspathncmp(const char *a, const char *b, size_t count);
int fspathcmp(const char *a, const char *b);
int fspathncmp(const char *a, const char *b, size_t count);
/*
* The prefix part of pattern must not contains wildcards.
*/
struct pathspec_item;
extern int git_fnmatch(const struct pathspec_item *item,
int git_fnmatch(const struct pathspec_item *item,
const char *pattern, const char *string,
int prefix);
extern int submodule_path_match(const struct index_state *istate,
int submodule_path_match(const struct index_state *istate,
const struct pathspec *ps,
const char *submodule_name,
char *seen);
......@@ -372,10 +372,10 @@ void remove_untracked_cache(struct index_state *istate);
* When `recurse_into_nested` is set, recurse into any nested submodules,
* connecting them as well.
*/
extern void connect_work_tree_and_git_dir(const char *work_tree,
void connect_work_tree_and_git_dir(const char *work_tree,
const char *git_dir,
int recurse_into_nested);
extern void relocate_gitdir(const char *path,
void relocate_gitdir(const char *path,
const char *old_git_dir,
const char *new_git_dir);
#endif
......@@ -3,14 +3,14 @@
struct argv_array;
extern void git_set_exec_path(const char *exec_path);
extern void git_resolve_executable_dir(const char *path);
extern const char *git_exec_path(void);
extern void setup_path(void);
extern const char **prepare_git_cmd(struct argv_array *out, const char **argv);
extern int execv_git_cmd(const char **argv); /* NULL terminated */
void git_set_exec_path(const char *exec_path);
void git_resolve_executable_dir(const char *path);
const char *git_exec_path(void);
void setup_path(void);
const char **prepare_git_cmd(struct argv_array *out, const char **argv);
int execv_git_cmd(const char **argv); /* NULL terminated */
LAST_ARG_MUST_BE_NULL
extern int execl_git_cmd(const char *cmd, ...);
extern char *system_path(const char *path);
char *system_path(const char *path);
#endif /* GIT_EXEC_CMD_H */
......@@ -2,6 +2,6 @@
#define FMT_MERGE_MSG_H
extern int merge_log_config;
extern int fmt_merge_msg_config(const char *key, const char *value, void *cb);
int fmt_merge_msg_config(const char *key, const char *value, void *cb);
#endif /* FMT_MERGE_MSG_H */
......@@ -10,31 +10,31 @@ extern struct trace_key trace_fsmonitor;
* Read the fsmonitor index extension and (if configured) restore the
* CE_FSMONITOR_VALID state.
*/
extern int read_fsmonitor_extension(struct index_state *istate, const void *data, unsigned long sz);
int read_fsmonitor_extension(struct index_state *istate, const void *data, unsigned long sz);
/*
* Fill the fsmonitor_dirty ewah bits with their state from the index,
* before it is split during writing.
*/
extern void fill_fsmonitor_bitmap(struct index_state *istate);
void fill_fsmonitor_bitmap(struct index_state *istate);
/*
* Write the CE_FSMONITOR_VALID state into the fsmonitor index
* extension. Reads from the fsmonitor_dirty ewah in the index.
*/
extern void write_fsmonitor_extension(struct strbuf *sb, struct index_state *istate);
void write_fsmonitor_extension(struct strbuf *sb, struct index_state *istate);
/*
* Add/remove the fsmonitor index extension
*/
extern void add_fsmonitor(struct index_state *istate);
extern void remove_fsmonitor(struct index_state *istate);
void add_fsmonitor(struct index_state *istate);
void remove_fsmonitor(struct index_state *istate);
/*
* Add/remove the fsmonitor index extension as necessary based on the current
* core.fsmonitor setting.
*/
extern void tweak_fsmonitor(struct index_state *istate);
void tweak_fsmonitor(struct index_state *istate);
/*
* Run the configured fsmonitor integration script and clear the
......@@ -42,7 +42,7 @@ extern void tweak_fsmonitor(struct index_state *istate);
* any corresponding untracked cache directory structures. Optimized to only
* run the first time it is called.
*/
extern void refresh_fsmonitor(struct index_state *istate);
void refresh_fsmonitor(struct index_state *istate);