*.[ch]: manually align parameter lists
In previous patches, extern was mechanically removed from function declarations without care to formatting, causing parameter lists to be misaligned. Manually format changed sections such that the parameter lists should be realigned. Viewing this patch with 'git diff -w' should produce no output. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu committed
Apr 29, 2019 at 04:28 UTC
ad6dad0996f9226b2c3a5a3c725bf2952e52d7e7
44 files changed
+202
-202
archive.h
+5
-5
@@ -24,8 +24,8 @@ struct archiver_args {
24
/* main api */
25
26
int write_archive(int argc, const char **argv, const char *prefix,
27
- struct repository *repo,
28
- const char *name_hint, int remote);
27
+ struct repository *repo,
28
+ const char *name_hint, int remote);
29
30
const char *archive_format_from_filename(const char *filename);
31
@@ -52,8 +52,8 @@ typedef int (*write_archive_entry_fn_t)(struct archiver_args *args,
52
53
int write_archive_entries(struct archiver_args *args, write_archive_entry_fn_t write_entry);
54
void *object_file_to_archive(const struct archiver_args *args,
55
- const char *path, const struct object_id *oid,
56
- unsigned int mode, enum object_type *type,
57
- unsigned long *sizep);
55
+ const char *path, const struct object_id *oid,
56
+ unsigned int mode, enum object_type *type,
57
+ unsigned long *sizep);
58
59
#endif /* ARCHIVE_H */
bisect.h
+7
-7
@@ -12,13 +12,13 @@ struct repository;
12
* best commit, as chosen by `find_all`.
13
*/
14
void find_bisection(struct commit_list **list, int *reaches, int *all,
15
- int find_all);
15
+ int find_all);
16
17
struct commit_list *filter_skipped(struct commit_list *list,
18
- struct commit_list **tried,
19
- int show_all,
20
- int *count,
21
- int *skipped_first);
18
+ struct commit_list **tried,
19
+ int show_all,
20
+ int *count,
21
+ int *skipped_first);
22
23
#define BISECT_SHOW_ALL (1<<0)
24
#define REV_LIST_QUIET (1<<1)
@@ -32,8 +32,8 @@ struct rev_list_info {
32
};
33
34
int bisect_next_all(struct repository *r,
35
- const char *prefix,
36
- int no_checkout);
35
+ const char *prefix,
36
+ int no_checkout);
37
38
int estimate_bisect_steps(int all);
39
branch.h
+1
-1
@@ -92,6 +92,6 @@ void die_if_checked_out(const char *branch, int ignore_current_worktree);
92
* otherwise.
93
*/
94
int replace_each_worktree_head_symref(const char *oldref, const char *newref,
95
- const char *logmsg);
95
+ const char *logmsg);
96
97
#endif
builtin.h
+1
-1
@@ -111,7 +111,7 @@ struct fmt_merge_msg_opts {
111
};
112
113
int fmt_merge_msg(struct strbuf *in, struct strbuf *out,
114
- struct fmt_merge_msg_opts *);
114
+ struct fmt_merge_msg_opts *);
115
116
/**
117
* If a built-in has DELAY_PAGER_CONFIG set, the built-in should call this early
bulk-checkin.h
+2
-2
@@ -7,8 +7,8 @@
7
#include "cache.h"
8
9
int index_bulk_checkin(struct object_id *oid,
10
- int fd, size_t size, enum object_type type,
11
- const char *path, unsigned flags);
10
+ int fd, size_t size, enum object_type type,
11
+ const char *path, unsigned flags);
12
13
void plug_bulk_checkin(void);
14
void unplug_bulk_checkin(void);
cache.h
+21
-21
@@ -616,7 +616,7 @@ void setup_work_tree(void);
616
* either 0 upon success and non-zero if no repository was found.
617
*/
618
int discover_git_directory(struct strbuf *commondir,
619
- struct strbuf *gitdir);
619
+ struct strbuf *gitdir);
620
const char *setup_git_directory_gently(int *);
621
const char *setup_git_directory(void);
622
char *prefix_path(const char *prefix, int len, const char *path);
@@ -636,8 +636,8 @@ char *prefix_filename(const char *prefix, const char *path);
636
637
int check_filename(const char *prefix, const char *name);
638
void verify_filename(const char *prefix,
639
- const char *name,
640
- int diagnose_misspelt_rev);
639
+ const char *name,
640
+ int diagnose_misspelt_rev);
641
void verify_non_filename(const char *prefix, const char *name);
642
int path_inside_repo(const char *prefix, const char *path);
643
@@ -645,7 +645,7 @@ int path_inside_repo(const char *prefix, const char *path);
645
#define INIT_DB_EXIST_OK 0x0002
646
647
int init_db(const char *git_dir, const char *real_git_dir,
648
- const char *template_dir, unsigned int flags);
648
+ const char *template_dir, unsigned int flags);
649
650
void sanitize_stdfds(void);
651
int daemonize(void);
@@ -673,12 +673,12 @@ int daemonize(void);
673
/* Initialize and use the cache information */
674
struct lock_file;
675
void preload_index(struct index_state *index,
676
- const struct pathspec *pathspec,
677
- unsigned int refresh_flags);
676
+ const struct pathspec *pathspec,
677
+ unsigned int refresh_flags);
678
int do_read_index(struct index_state *istate, const char *path,
679
- int must_exist); /* for testting only! */
679
+ int must_exist); /* for testting only! */
680
int read_index_from(struct index_state *, const char *path,
681
- const char *gitdir);
681
+ const char *gitdir);
682
int is_index_unborn(struct index_state *);
683
684
/* For use with `write_locked_index()`. */
@@ -718,8 +718,8 @@ int unmerged_index(const struct index_state *);
718
* to it.
719
*/
720
int repo_index_has_changes(struct repository *repo,
721
- struct tree *tree,
722
- struct strbuf *sb);
721
+ struct tree *tree,
722
+ struct strbuf *sb);
723
724
int verify_path(const char *path, unsigned mode);
725
int strcmp_offset(const char *s1, const char *s2, size_t *first_change);
@@ -797,7 +797,7 @@ void *read_blob_data_from_index(const struct index_state *, const char *, unsign
797
/* don't refresh_fsmonitor state or do stat comparison even if CE_FSMONITOR_VALID is true */
798
#define CE_MATCH_IGNORE_FSMONITOR 0X20
799
int is_racy_timestamp(const struct index_state *istate,
800
- const struct cache_entry *ce);
800
+ const struct cache_entry *ce);
801
int ie_match_stat(struct index_state *, const struct cache_entry *, struct stat *, unsigned int);
802
int ie_modified(struct index_state *, const struct cache_entry *, struct stat *, unsigned int);
803
@@ -821,7 +821,7 @@ void fill_stat_data(struct stat_data *sd, struct stat *st);
821
*/
822
int match_stat_data(const struct stat_data *sd, struct stat *st);
823
int match_stat_data_racy(const struct index_state *istate,
824
- const struct stat_data *sd, struct stat *st);
824
+ const struct stat_data *sd, struct stat *st);
825
826
void fill_stat_cache_info(struct cache_entry *ce, struct stat *st);
827
@@ -1386,8 +1386,8 @@ int get_oid_treeish(const char *str, struct object_id *oid);
1386
int get_oid_blob(const char *str, struct object_id *oid);
1387
void maybe_die_on_misspelt_object_name(const char *name, const char *prefix);
1388
enum get_oid_result get_oid_with_context(struct repository *repo, const char *str,
1389
- unsigned flags, struct object_id *oid,
1390
- struct object_context *oc);
1389
+ unsigned flags, struct object_id *oid,
1390
+ struct object_context *oc);
1391
1392
typedef int each_abbrev_fn(const struct object_id *oid, void *);
1393
int for_each_abbrev(const char *prefix, each_abbrev_fn, void *);
@@ -1469,7 +1469,7 @@ int parse_oid_hex(const char *hex, struct object_id *oid, const char **end);
1469
#define INTERPRET_BRANCH_REMOTE (1<<1)
1470
#define INTERPRET_BRANCH_HEAD (1<<2)
1471
int interpret_branch_name(const char *str, int len, struct strbuf *,
1472
- unsigned allowed);
1472
+ unsigned allowed);
1473
int get_oid_mb(const char *str, struct object_id *oid);
1474
1475
int validate_headref(const char *ref);
@@ -1480,12 +1480,12 @@ int name_compare(const char *name1, size_t len1, const char *name2, size_t len2)
1480
int cache_name_stage_compare(const char *name1, int len1, int stage1, const char *name2, int len2, int stage2);
1481
1482
void *read_object_with_reference(const struct object_id *oid,
1483
- const char *required_type,
1484
- unsigned long *size,
1485
- struct object_id *oid_ret);
1483
+ const char *required_type,
1484
+ unsigned long *size,
1485
+ struct object_id *oid_ret);
1486
1487
struct object *peel_to_type(const char *name, int namelen,
1488
- struct object *o, enum object_type);
1488
+ struct object *o, enum object_type);
1489
1490
enum date_mode_type {
1491
DATE_NORMAL = 0,
@@ -1542,8 +1542,8 @@ enum want_ident {
1542
const char *git_author_info(int);
1543
const char *git_committer_info(int);
1544
const char *fmt_ident(const char *name, const char *email,
1545
- enum want_ident whose_ident,
1546
- const char *date_str, int);
1545
+ enum want_ident whose_ident,
1546
+ const char *date_str, int);
1547
const char *fmt_name(enum want_ident);
1548
const char *ident_default_name(void);
1549
const char *ident_default_email(void);
checkout.h
+2
-2
@@ -9,7 +9,7 @@
9
* exists, NULL otherwise.
10
*/
11
const char *unique_tracking_name(const char *name,
12
- struct object_id *oid,
13
- int *dwim_remotes_matched);
12
+ struct object_id *oid,
13
+ int *dwim_remotes_matched);
14
15
#endif /* CHECKOUT_H */
column.h
+2
-2
@@ -29,7 +29,7 @@ struct column_options {
29
struct option;
30
int parseopt_column_callback(const struct option *, const char *, int);
31
int git_column_config(const char *var, const char *value,
32
- const char *command, unsigned int *colopts);
32
+ const char *command, unsigned int *colopts);
33
int finalize_colopts(unsigned int *colopts, int stdout_is_tty);
34
static inline int column_active(unsigned int colopts)
35
{
@@ -38,7 +38,7 @@ static inline int column_active(unsigned int colopts)
38
39
struct string_list;
40
void print_columns(const struct string_list *list, unsigned int colopts,
41
- const struct column_options *opts);
41
+ const struct column_options *opts);
42
43
int run_column_filter(int colopts, const struct column_options *);
44
int stop_column_filter(void);
commit.h
+22
-22
@@ -179,8 +179,8 @@ struct rev_info; /* in revision.h, it circularly uses enum cmit_fmt */
179
180
int has_non_ascii(const char *text);
181
const char *logmsg_reencode(const struct commit *commit,
182
- char **commit_encoding,
183
- const char *output_encoding);
182
+ char **commit_encoding,
183
+ const char *output_encoding);
184
const char *repo_logmsg_reencode(struct repository *r,
185
const struct commit *commit,
186
char **commit_encoding,
@@ -245,15 +245,15 @@ int unregister_shallow(const struct object_id *oid);
245
int for_each_commit_graft(each_commit_graft_fn, void *);
246
int is_repository_shallow(struct repository *r);
247
struct commit_list *get_shallow_commits(struct object_array *heads,
248
- int depth, int shallow_flag, int not_shallow_flag);
248
+ int depth, int shallow_flag, int not_shallow_flag);
249
struct commit_list *get_shallow_commits_by_rev_list(
250
int ac, const char **av, int shallow_flag, int not_shallow_flag);
251
void set_alternate_shallow_file(struct repository *r, const char *path, int override);
252
int write_shallow_commits(struct strbuf *out, int use_pack_protocol,
253
- const struct oid_array *extra);
253
+ const struct oid_array *extra);
254
void setup_alternate_shallow(struct lock_file *shallow_lock,
255
- const char **alternate_shallow_file,
256
- const struct oid_array *extra);
255
+ const char **alternate_shallow_file,
256
+ const struct oid_array *extra);
257
const char *setup_temporary_shallow(const struct oid_array *extra);
258
void advertise_shallow_grafts(int);
259
@@ -276,8 +276,8 @@ void prepare_shallow_info(struct shallow_info *, struct oid_array *);
276
void clear_shallow_info(struct shallow_info *);
277
void remove_nonexistent_theirs_shallow(struct shallow_info *);
278
void assign_shallow_commits_to_refs(struct shallow_info *info,
279
- uint32_t **used,
280
- int *ref_status);
279
+ uint32_t **used,
280
+ int *ref_status);
281
int delayed_reachability_test(struct shallow_info *si, int c);
282
#define PRUNE_SHOW_ONLY 1
283
#define PRUNE_QUICK 2
@@ -286,7 +286,7 @@ extern struct trace_key trace_shallow;
286
287
int interactive_add(int argc, const char **argv, const char *prefix, int patch);
288
int run_add_interactive(const char *revision, const char *patch_mode,
289
- const struct pathspec *pathspec);
289
+ const struct pathspec *pathspec);
290
291
struct commit_extra_header {
292
struct commit_extra_header *next;
@@ -296,19 +296,19 @@ struct commit_extra_header {
296
};
297
298
void append_merge_tag_headers(struct commit_list *parents,
299
- struct commit_extra_header ***tail);
299
+ struct commit_extra_header ***tail);
300
301
int commit_tree(const char *msg, size_t msg_len,
302
- const struct object_id *tree,
303
- struct commit_list *parents, struct object_id *ret,
304
- const char *author, const char *sign_commit);
302
+ const struct object_id *tree,
303
+ struct commit_list *parents, struct object_id *ret,
304
+ const char *author, const char *sign_commit);
305
306
int commit_tree_extended(const char *msg, size_t msg_len,
307
- const struct object_id *tree,
308
- struct commit_list *parents,
309
- struct object_id *ret, const char *author,
310
- const char *sign_commit,
311
- struct commit_extra_header *);
307
+ const struct object_id *tree,
308
+ struct commit_list *parents,
309
+ struct object_id *ret, const char *author,
310
+ const char *sign_commit,
311
+ struct commit_extra_header *);
312
313
struct commit_extra_header *read_commit_extra_headers(struct commit *, const char **);
314
@@ -323,13 +323,13 @@ void free_commit_extra_headers(struct commit_extra_header *extra);
323
* responsibility to parse further in this case!
324
*/
325
const char *find_commit_header(const char *msg, const char *key,
326
- size_t *out_len);
326
+ size_t *out_len);
327
328
/* Find the end of the log message, the right place for a new trailer. */
329
size_t ignore_non_trailer(const char *buf, size_t len);
330
331
typedef int (*each_mergetag_fn)(struct commit *commit, struct commit_extra_header *extra,
332
- void *cb_data);
332
+ void *cb_data);
333
334
int for_each_mergetag(each_mergetag_fn fn, struct commit *commit, void *data);
335
@@ -339,7 +339,7 @@ struct merge_remote_desc {
339
};
340
struct merge_remote_desc *merge_remote_util(struct commit *);
341
void set_merge_remote_desc(struct commit *commit,
342
- const char *name, struct object *obj);
342
+ const char *name, struct object *obj);
343
344
/*
345
* Given "name" from the command line to merge, find the commit object
@@ -349,7 +349,7 @@ void set_merge_remote_desc(struct commit *commit,
349
struct commit *get_merge_parent(const char *name);
350
351
int parse_signed_commit(const struct commit *commit,
352
- struct strbuf *message, struct strbuf *signature);
352
+ struct strbuf *message, struct strbuf *signature);
353
int remove_signature(struct strbuf *buf);
354
355
/*
config.h
+22
-22
@@ -71,22 +71,22 @@ typedef int (*config_fn_t)(const char *, const char *, void *);
71
int git_default_config(const char *, const char *, void *);
72
int git_config_from_file(config_fn_t fn, const char *, void *);
73
int git_config_from_file_with_options(config_fn_t fn, const char *,
74
- void *,
75
- const struct config_options *);
74
+ void *,
75
+ const struct config_options *);
76
int git_config_from_mem(config_fn_t fn,
77
- const enum config_origin_type,
78
- const char *name,
79
- const char *buf, size_t len,
80
- void *data, const struct config_options *opts);
77
+ const enum config_origin_type,
78
+ const char *name,
79
+ const char *buf, size_t len,
80
+ void *data, const struct config_options *opts);
81
int git_config_from_blob_oid(config_fn_t fn, const char *name,
82
- const struct object_id *oid, void *data);
82
+ const struct object_id *oid, void *data);
83
void git_config_push_parameter(const char *text);
84
int git_config_from_parameters(config_fn_t fn, void *data);
85
void read_early_config(config_fn_t cb, void *data);
86
void git_config(config_fn_t fn, void *);
87
int config_with_options(config_fn_t fn, void *,
88
- struct git_config_source *config_source,
89
- const struct config_options *opts);
88
+ struct git_config_source *config_source,
89
+ const struct config_options *opts);
90
int git_parse_ssize_t(const char *, ssize_t *);
91
int git_parse_ulong(const char *, unsigned long *);
92
int git_parse_maybe_bool(const char *);
@@ -160,9 +160,9 @@ int git_config_include(const char *name, const char *value, void *data);
160
* there is no subsection at all.
161
*/
162
int parse_config_key(const char *var,
163
- const char *section,
164
- const char **subsection, int *subsection_len,
165
- const char **key);
163
+ const char *section,
164
+ const char **subsection, int *subsection_len,
165
+ const char **key);
166
167
struct config_set_element {
168
struct hashmap_entry ent;
@@ -215,25 +215,25 @@ int git_configset_get_pathname(struct config_set *cs, const char *key, const cha
215
struct repository;
216
void repo_config(struct repository *repo, config_fn_t fn, void *data);
217
int repo_config_get_value(struct repository *repo,
218
- const char *key, const char **value);
218
+ const char *key, const char **value);
219
const struct string_list *repo_config_get_value_multi(struct repository *repo,
220
- const char *key);
220
+ const char *key);
221
int repo_config_get_string_const(struct repository *repo,
222
- const char *key, const char **dest);
222
+ const char *key, const char **dest);
223
int repo_config_get_string(struct repository *repo,
224
- const char *key, char **dest);
224
+ const char *key, char **dest);
225
int repo_config_get_int(struct repository *repo,
226
- const char *key, int *dest);
226
+ const char *key, int *dest);
227
int repo_config_get_ulong(struct repository *repo,
228
- const char *key, unsigned long *dest);
228
+ const char *key, unsigned long *dest);
229
int repo_config_get_bool(struct repository *repo,
230
- const char *key, int *dest);
230
+ const char *key, int *dest);
231
int repo_config_get_bool_or_int(struct repository *repo,
232
- const char *key, int *is_bool, int *dest);
232
+ const char *key, int *is_bool, int *dest);
233
int repo_config_get_maybe_bool(struct repository *repo,
234
- const char *key, int *dest);
234
+ const char *key, int *dest);
235
int repo_config_get_pathname(struct repository *repo,
236
- const char *key, const char **dest);
236
+ const char *key, const char **dest);
237
238
int git_config_get_value(const char *key, const char **value);
239
const struct string_list *git_config_get_value_multi(const char *key);
connect.h
+1
-1
@@ -20,6 +20,6 @@ enum protocol_version discover_version(struct packet_reader *reader);
20
21
int server_supports_v2(const char *c, int die_on_error);
22
int server_supports_feature(const char *c, const char *feature,
23
- int die_on_error);
23
+ int die_on_error);
24
25
#endif
delta.h
+2
-2
@@ -76,8 +76,8 @@ diff_delta(const void *src_buf, unsigned long src_bufsize,
76
* returned. The returned buffer must be freed by the caller.
77
*/
78
void *patch_delta(const void *src_buf, unsigned long src_size,
79
- const void *delta_buf, unsigned long delta_size,
80
- unsigned long *dst_size);
79
+ const void *delta_buf, unsigned long delta_size,
80
+ unsigned long *dst_size);
81
82
/* the smallest possible delta size is 4 bytes */
83
#define DELTA_SIZE_MIN 4
dir.h
+31
-31
@@ -217,23 +217,23 @@ int simple_length(const char *match);
217
int no_wildcard(const char *string);
218
char *common_prefix(const struct pathspec *pathspec);
219
int match_pathspec(const struct index_state *istate,
220
- const struct pathspec *pathspec,
221
- const char *name, int namelen,
222
- int prefix, char *seen, int is_dir);
220
+ const struct pathspec *pathspec,
221
+ const char *name, int namelen,
222
+ int prefix, char *seen, int is_dir);
223
int report_path_error(const char *ps_matched, const struct pathspec *pathspec, const char *prefix);
224
int within_depth(const char *name, int namelen, int depth, int max_depth);
225
226
int fill_directory(struct dir_struct *dir,
227
- struct index_state *istate,
228
- const struct pathspec *pathspec);
227
+ struct index_state *istate,
228
+ const struct pathspec *pathspec);
229
int read_directory(struct dir_struct *, struct index_state *istate,
230
- const char *path, int len,
231
- const struct pathspec *pathspec);
230
+ const char *path, int len,
231
+ const struct pathspec *pathspec);
232
233
int is_excluded_from_list(const char *pathname, int pathlen,
234
- const char *basename, int *dtype,
235
- struct exclude_list *el,
236
- struct index_state *istate);
234
+ const char *basename, int *dtype,
235
+ struct exclude_list *el,
236
+ struct index_state *istate);
237
struct dir_entry *dir_add_ignored(struct dir_struct *dir,
238
struct index_state *istate,
239
const char *pathname, int len);
@@ -243,30 +243,30 @@ struct dir_entry *dir_add_ignored(struct dir_struct *dir,
243
* attr.c:path_matches()
244
*/
245
int match_basename(const char *, int,
246
- const char *, int, int, unsigned);
246
+ const char *, int, int, unsigned);
247
int match_pathname(const char *, int,
248
- const char *, int,
249
- const char *, int, int, unsigned);
248
+ const char *, int,
249
+ const char *, int, int, unsigned);
250
251
struct exclude *last_exclude_matching(struct dir_struct *dir,
252
- struct index_state *istate,
253
- const char *name, int *dtype);
252
+ struct index_state *istate,
253
+ const char *name, int *dtype);
254
255
int is_excluded(struct dir_struct *dir,
256
- struct index_state *istate,
257
- const char *name, int *dtype);
256
+ struct index_state *istate,
257
+ const char *name, int *dtype);
258
259
struct exclude_list *add_exclude_list(struct dir_struct *dir,
260
- int group_type, const char *src);
260
+ int group_type, const char *src);
261
int add_excludes_from_file_to_list(const char *fname, const char *base, int baselen,
262
- struct exclude_list *el, struct index_state *istate);
262
+ struct exclude_list *el, struct index_state *istate);
263
void add_excludes_from_file(struct dir_struct *, const char *fname);
264
int add_excludes_from_blob_to_list(struct object_id *oid,
265
- const char *base, int baselen,
266
- struct exclude_list *el);
265
+ const char *base, int baselen,
266
+ struct exclude_list *el);
267
void parse_exclude_pattern(const char **string, int *patternlen, unsigned *flags, int *nowildcardlen);
268
void add_exclude(const char *string, const char *base,
269
- int baselen, struct exclude_list *el, int srcpos);
269
+ int baselen, struct exclude_list *el, int srcpos);
270
void clear_exclude_list(struct exclude_list *el);
271
void clear_directory(struct dir_struct *dir);
272
int file_exists(const char *);
@@ -324,13 +324,13 @@ int fspathncmp(const char *a, const char *b, size_t count);
324
*/
325
struct pathspec_item;
326
int git_fnmatch(const struct pathspec_item *item,
327
- const char *pattern, const char *string,
328
- int prefix);
327
+ const char *pattern, const char *string,
328
+ int prefix);
329
330
int submodule_path_match(const struct index_state *istate,
331
- const struct pathspec *ps,
332
- const char *submodule_name,
333
- char *seen);
331
+ const struct pathspec *ps,
332
+ const char *submodule_name,
333
+ char *seen);
334
335
static inline int ce_path_match(const struct index_state *istate,
336
const struct cache_entry *ce,
@@ -373,9 +373,9 @@ void remove_untracked_cache(struct index_state *istate);
373
* connecting them as well.
374
*/
375
void connect_work_tree_and_git_dir(const char *work_tree,
376
- const char *git_dir,
377
- int recurse_into_nested);
376
+ const char *git_dir,
377
+ int recurse_into_nested);
378
void relocate_gitdir(const char *path,
379
- const char *old_git_dir,
380
- const char *new_git_dir);
379
+ const char *old_git_dir,
380
+ const char *new_git_dir);
381
#endif
git-compat-util.h
+2
-2
@@ -770,13 +770,13 @@ FILE *git_fopen(const char*, const char*);
770
#endif
771
#define snprintf git_snprintf
772
int git_snprintf(char *str, size_t maxsize,
773
- const char *format, ...);
773
+ const char *format, ...);
774
#ifdef vsnprintf
775
#undef vsnprintf
776
#endif
777
#define vsnprintf git_vsnprintf
778
int git_vsnprintf(char *str, size_t maxsize,
779
- const char *format, va_list ap);
779
+ const char *format, va_list ap);
780
#endif
781
782
#ifdef __GLIBC_PREREQ
help.h
+3
-3
@@ -27,12 +27,12 @@ void list_config_help(int for_human);
27
void list_all_main_cmds(struct string_list *list);
28
void list_all_other_cmds(struct string_list *list);
29
void list_cmds_by_category(struct string_list *list,
30
- const char *category);
30
+ const char *category);
31
void list_cmds_by_config(struct string_list *list);
32
const char *help_unknown_cmd(const char *cmd);
33
void load_command_list(const char *prefix,
34
- struct cmdnames *main_cmds,
35
- struct cmdnames *other_cmds);
34
+ struct cmdnames *main_cmds,
35
+ struct cmdnames *other_cmds);
36
void add_cmdname(struct cmdnames *cmds, const char *name, int len);
37
/* Here we require that excludes is a sorted list. */
38
void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes);
http.h
+5
-5
@@ -104,7 +104,7 @@ void step_active_slots(void);
104
#endif
105
106
void http_init(struct remote *remote, const char *url,
107
- int proactive_auth);
107
+ int proactive_auth);
108
void http_cleanup(void);
109
struct curl_slist *http_copy_default_headers(void);
110
@@ -147,10 +147,10 @@ void normalize_curl_result(CURLcode *result, long http_code, char *errorstr,
147
148
/* Helpers for modifying and creating URLs */
149
void append_remote_object_url(struct strbuf *buf, const char *url,
150
- const char *hex,
151
- int only_two_digit_prefix);
150
+ const char *hex,
151
+ int only_two_digit_prefix);
152
char *get_remote_object_url(const char *url, const char *hex,
153
- int only_two_digit_prefix);
153
+ int only_two_digit_prefix);
154
155
/* Options for http_get_*() */
156
struct http_get_options {
@@ -208,7 +208,7 @@ int http_fetch_ref(const char *base, struct ref *ref);
208
209
/* Helpers for fetching packs */
210
int http_get_info_packs(const char *base_url,
211
- struct packed_git **packs_head);
211
+ struct packed_git **packs_head);
212
213
struct http_pack_request {
214
char *url;
khash.h
+3
-3
@@ -69,11 +69,11 @@ static const double __ac_HASH_UPPER = 0.77;
69
khval_t *vals; \
70
} kh_##name##_t;
71
72
-#define __KHASH_PROTOTYPES(name, khkey_t, khval_t) \
73
- kh_##name##_t *kh_init_##name(void); \
72
+#define __KHASH_PROTOTYPES(name, khkey_t, khval_t) \
73
+ kh_##name##_t *kh_init_##name(void); \
74
void kh_destroy_##name(kh_##name##_t *h); \
75
void kh_clear_##name(kh_##name##_t *h); \
76
- khint_t kh_get_##name(const kh_##name##_t *h, khkey_t key); \
76
+ khint_t kh_get_##name(const kh_##name##_t *h, khkey_t key); \
77
int kh_resize_##name(kh_##name##_t *h, khint_t new_n_buckets); \
78
khint_t kh_put_##name(kh_##name##_t *h, khkey_t key, int *ret); \
79
void kh_del_##name(kh_##name##_t *h, khint_t x);
lockfile.h
+1
-1
@@ -189,7 +189,7 @@ static inline int is_lock_file_locked(struct lock_file *lk)
189
* `errno` set by the failing call.
190
*/
191
void unable_to_lock_message(const char *path, int err,
192
- struct strbuf *buf);
192
+ struct strbuf *buf);
193
194
/*
195
* Emit an appropriate error message and `die()` following the failure
ls-refs.h
+1
-1
@@ -5,6 +5,6 @@ struct repository;
5
struct argv_array;
6
struct packet_reader;
7
int ls_refs(struct repository *r, struct argv_array *keys,
8
- struct packet_reader *request);
8
+ struct packet_reader *request);
9
10
#endif /* LS_REFS_H */
merge-blobs.h
+2
-2
@@ -5,7 +5,7 @@ struct blob;
5
struct index_state;
6
7
void *merge_blobs(struct index_state *, const char *,
8
- struct blob *, struct blob *,
9
- struct blob *, unsigned long *);
8
+ struct blob *, struct blob *,
9
+ struct blob *, unsigned long *);
10
11
#endif /* MERGE_BLOBS_H */
object-store.h
+8
-8
@@ -163,9 +163,9 @@ void *map_loose_object(struct repository *r, const struct object_id *oid,
163
unsigned long *size);
164
165
void *read_object_file_extended(struct repository *r,
166
- const struct object_id *oid,
167
- enum object_type *type,
168
- unsigned long *size, int lookup_replace);
166
+ const struct object_id *oid,
167
+ enum object_type *type,
168
+ unsigned long *size, int lookup_replace);
169
static inline void *repo_read_object_file(struct repository *r,
170
const struct object_id *oid,
171
enum object_type *type,
@@ -181,17 +181,17 @@ static inline void *repo_read_object_file(struct repository *r,
181
int oid_object_info(struct repository *r, const struct object_id *, unsigned long *);
182
183
int hash_object_file(const void *buf, unsigned long len,
184
- const char *type, struct object_id *oid);
184
+ const char *type, struct object_id *oid);
185
186
int write_object_file(const void *buf, unsigned long len,
187
- const char *type, struct object_id *oid);
187
+ const char *type, struct object_id *oid);
188
189
int hash_object_file_literally(const void *buf, unsigned long len,
190
- const char *type, struct object_id *oid,
191
- unsigned flags);
190
+ const char *type, struct object_id *oid,
191
+ unsigned flags);
192
193
int pretend_object_file(void *, unsigned long, enum object_type,
194
- struct object_id *oid);
194
+ struct object_id *oid);
195
196
int force_object_loose(const struct object_id *oid, time_t mtime);
197
oidmap.h
+1
-1
@@ -47,7 +47,7 @@ void oidmap_free(struct oidmap *map, int free_entries);
47
* Returns the oidmap entry for the specified oid, or NULL if not found.
48
*/
49
void *oidmap_get(const struct oidmap *map,
50
- const struct object_id *key);
50
+ const struct object_id *key);
51
52
/*
53
* Adds or replaces an oidmap entry.
pack.h
+1
-1
@@ -93,7 +93,7 @@ char *index_pack_lockfile(int fd);
93
*/
94
#define MAX_PACK_OBJECT_HEADER 10
95
int encode_in_pack_object_header(unsigned char *hdr, int hdr_len,
96
- enum object_type, uintmax_t);
96
+ enum object_type, uintmax_t);
97
98
#define PH_ERROR_EOF (-1)
99
#define PH_ERROR_PACK_SIGNATURE (-2)
packfile.h
+4
-4
@@ -60,7 +60,7 @@ struct packed_git *get_all_packs(struct repository *r);
60
unsigned long approximate_object_count(void);
61
62
struct packed_git *find_sha1_pack(const unsigned char *sha1,
63
- struct packed_git *packs);
63
+ struct packed_git *packs);
64
65
void pack_report(void);
66
@@ -144,8 +144,8 @@ void release_pack_memory(size_t);
144
extern int do_check_packed_object_crc;
145
146
int packed_object_info(struct repository *r,
147
- struct packed_git *pack,
148
- off_t offset, struct object_info *);
147
+ struct packed_git *pack,
148
+ off_t offset, struct object_info *);
149
150
void mark_bad_packed_object(struct packed_git *p, const unsigned char *sha1);
151
const struct packed_git *has_packed_and_bad(struct repository *r, const unsigned char *sha1);
@@ -177,6 +177,6 @@ int is_promisor_object(const struct object_id *oid);
177
* probably use open_pack_index() or parse_pack_index() instead.
178
*/
179
int load_idx(const char *path, const unsigned int hashsz, void *idx_map,
180
- size_t idx_size, struct packed_git *p);
180
+ size_t idx_size, struct packed_git *p);
181
182
#endif
path.h
+5
-5
@@ -38,8 +38,8 @@ char *mksnpath(char *buf, size_t n, const char *fmt, ...)
38
* append it in the provided buffer `sb`.
39
*/
40
void strbuf_git_common_path(struct strbuf *sb,
41
- const struct repository *repo,
42
- const char *fmt, ...)
41
+ const struct repository *repo,
42
+ const char *fmt, ...)
43
__attribute__((format (printf, 3, 4)));
44
45
/*
@@ -67,7 +67,7 @@ const char *git_common_path(const char *fmt, ...)
67
* Return a path into the git directory of repository `repo`.
68
*/
69
char *repo_git_path(const struct repository *repo,
70
- const char *fmt, ...)
70
+ const char *fmt, ...)
71
__attribute__((format (printf, 2, 3)));
72
73
/*
@@ -75,8 +75,8 @@ char *repo_git_path(const struct repository *repo,
75
* to the provided buffer `sb`.
76
*/
77
void strbuf_repo_git_path(struct strbuf *sb,
78
- const struct repository *repo,
79
- const char *fmt, ...)
78
+ const struct repository *repo,
79
+ const char *fmt, ...)
80
__attribute__((format (printf, 3, 4)));
81
82
/*
pkt-line.h
+2
-2
@@ -173,8 +173,8 @@ struct packet_reader {
173
* abstraction around the 'packet_read_with_status()' function.
174
*/
175
void packet_reader_init(struct packet_reader *reader, int fd,
176
- char *src_buffer, size_t src_len,
177
- int options);
176
+ char *src_buffer, size_t src_len,
177
+ int options);
178
179
/*
180
* Perform a packet read and return the status of the read.
ppc/sha1.c
+1
-1
@@ -11,7 +11,7 @@
11
#include "sha1.h"
12
13
void ppc_sha1_core(uint32_t *hash, const unsigned char *p,
14
- unsigned int nblocks);
14
+ unsigned int nblocks);
15
16
int ppc_SHA1_Init(ppc_SHA_CTX *c)
17
{
quote.h
+1
-1
@@ -68,7 +68,7 @@ void quote_two_c_style(struct strbuf *, const char *, const char *, int);
68
69
void write_name_quoted(const char *name, FILE *, int terminator);
70
void write_name_quoted_relative(const char *name, const char *prefix,
71
- FILE *fp, int terminator);
71
+ FILE *fp, int terminator);
72
73
/* quote path as relative to the given prefix */
74
char *quote_path_relative(const char *in, const char *prefix,
reachable.h
+2
-2
@@ -5,8 +5,8 @@ struct progress;
5
struct rev_info;
6
7
int add_unseen_recent_objects_to_traversal(struct rev_info *revs,
8
- timestamp_t timestamp);
8
+ timestamp_t timestamp);
9
void mark_reachable_objects(struct rev_info *revs, int mark_reflog,
10
- timestamp_t mark_recent, struct progress *);
10
+ timestamp_t mark_recent, struct progress *);
11
12
#endif
reflog-walk.h
+6
-6
@@ -8,17 +8,17 @@ struct reflog_walk_info;
8
9
void init_reflog_walk(struct reflog_walk_info **info);
10
int add_reflog_for_walk(struct reflog_walk_info *info,
11
- struct commit *commit, const char *name);
11
+ struct commit *commit, const char *name);
12
void show_reflog_message(struct reflog_walk_info *info, int,
13
- const struct date_mode *, int force_date);
13
+ const struct date_mode *, int force_date);
14
void get_reflog_message(struct strbuf *sb,
15
- struct reflog_walk_info *reflog_info);
15
+ struct reflog_walk_info *reflog_info);
16
const char *get_reflog_ident(struct reflog_walk_info *reflog_info);
17
timestamp_t get_reflog_timestamp(struct reflog_walk_info *reflog_info);
18
void get_reflog_selector(struct strbuf *sb,
19
- struct reflog_walk_info *reflog_info,
20
- const struct date_mode *dmode, int force_date,
21
- int shorten);
19
+ struct reflog_walk_info *reflog_info,
20
+ const struct date_mode *dmode, int force_date,
21
+ int shorten);
22
23
int reflog_walk_empty(struct reflog_walk_info *walk);
24
remote.h
+6
-6
@@ -140,15 +140,15 @@ struct packet_reader;
140
struct argv_array;
141
struct string_list;
142
struct ref **get_remote_heads(struct packet_reader *reader,
143
- struct ref **list, unsigned int flags,
144
- struct oid_array *extra_have,
145
- struct oid_array *shallow_points);
143
+ struct ref **list, unsigned int flags,
144
+ struct oid_array *extra_have,
145
+ struct oid_array *shallow_points);
146
147
/* Used for protocol v2 in order to retrieve refs from a remote */
148
struct ref **get_remote_refs(int fd_out, struct packet_reader *reader,
149
- struct ref **list, int for_push,
150
- const struct argv_array *ref_prefixes,
151
- const struct string_list *server_options);
149
+ struct ref **list, int for_push,
150
+ const struct argv_array *ref_prefixes,
151
+ const struct string_list *server_options);
152
153
int resolve_remote_symref(struct ref *ref, struct ref *list);
154
replace-object.h
+1
-1
@@ -17,7 +17,7 @@ void prepare_replace_object(struct repository *r);
17
* lookup_replace_object(). Please do not call it directly.
18
*/
19
const struct object_id *do_lookup_replace_object(struct repository *r,
20
- const struct object_id *oid);
20
+ const struct object_id *oid);
21
22
/*
23
* If object sha1 should be replaced, return the replacement object's
serve.h
+1
-1
@@ -3,7 +3,7 @@
3
4
struct argv_array;
5
int has_capability(const struct argv_array *keys, const char *capability,
6
- const char **value);
6
+ const char **value);
7
8
struct serve_options {
9
unsigned advertise_capabilities;
sha1-lookup.h
+3
-3
@@ -4,9 +4,9 @@
4
typedef const unsigned char *sha1_access_fn(size_t index, void *table);
5
6
int sha1_pos(const unsigned char *sha1,
7
- void *table,
8
- size_t nr,
9
- sha1_access_fn fn);
7
+ void *table,
8
+ size_t nr,
9
+ sha1_access_fn fn);
10
11
/*
12
* Searches for sha1 in table, using the given fanout table to determine the
string-list.h
+1
-1
@@ -175,7 +175,7 @@ struct string_list_item *string_list_insert(struct string_list *list, const char
175
* doesn't exist, the list is not altered.
176
*/
177
void string_list_remove(struct string_list *list, const char *string,
178
- int free_util);
178
+ int free_util);
179
180
/**
181
* Check if the given string is part of a sorted list. If it is part of the list,
sub-process.h
+3
-3
@@ -43,9 +43,9 @@ struct subprocess_capability {
43
44
/* Function to test two subprocess hashmap entries for equality. */
45
int cmd2process_cmp(const void *unused_cmp_data,
46
- const void *e1,
47
- const void *e2,
48
- const void *unused_keydata);
46
+ const void *e1,
47
+ const void *e2,
48
+ const void *unused_keydata);
49
50
/*
51
* User-supplied function to initialize the sub-process. This is
submodule-config.h
+1
-1
@@ -36,7 +36,7 @@ int parse_submodule_fetchjobs(const char *var, const char *value);
36
int parse_fetch_recurse_submodules_arg(const char *opt, const char *arg);
37
struct option;
38
int option_fetch_parse_recurse_submodules(const struct option *opt,
39
- const char *arg, int unset);
39
+ const char *arg, int unset);
40
int parse_update_recurse_submodules_arg(const char *opt, const char *arg);
41
int parse_push_recurse_submodules_arg(const char *opt, const char *arg);
42
void repo_read_gitmodules(struct repository *repo);
tag.h
+1
-1
@@ -18,6 +18,6 @@ void release_tag_memory(struct tag *t);
18
struct object *deref_tag(struct repository *r, struct object *, const char *, int);
19
struct object *deref_tag_noverify(struct object *);
20
int gpg_verify_tag(const struct object_id *oid,
21
- const char *name_to_report, unsigned flags);
21
+ const char *name_to_report, unsigned flags);
22
23
#endif /* TAG_H */
tempfile.h
+2
-2
@@ -137,7 +137,7 @@ struct tempfile *register_tempfile(const char *path);
137
138
/* See "mks_tempfile functions" above. */
139
struct tempfile *mks_tempfile_sm(const char *filename_template,
140
- int suffixlen, int mode);
140
+ int suffixlen, int mode);
141
142
/* See "mks_tempfile functions" above. */
143
static inline struct tempfile *mks_tempfile_s(const char *filename_template,
@@ -160,7 +160,7 @@ static inline struct tempfile *mks_tempfile(const char *filename_template)
160
161
/* See "mks_tempfile functions" above. */
162
struct tempfile *mks_tempfile_tsm(const char *filename_template,
163
- int suffixlen, int mode);
163
+ int suffixlen, int mode);
164
165
/* See "mks_tempfile functions" above. */
166
static inline struct tempfile *mks_tempfile_ts(const char *filename_template,
trace.h
+5
-5
@@ -133,18 +133,18 @@ void trace_performance_leave(const char *format, ...);
133
/* backend functions, use non-*fl macros instead */
134
__attribute__((format (printf, 4, 5)))
135
void trace_printf_key_fl(const char *file, int line, struct trace_key *key,
136
- const char *format, ...);
136
+ const char *format, ...);
137
__attribute__((format (printf, 4, 5)))
138
void trace_argv_printf_fl(const char *file, int line, const char **argv,
139
- const char *format, ...);
139
+ const char *format, ...);
140
void trace_strbuf_fl(const char *file, int line, struct trace_key *key,
141
- const struct strbuf *data);
141
+ const struct strbuf *data);
142
__attribute__((format (printf, 4, 5)))
143
void trace_performance_fl(const char *file, int line,
144
- uint64_t nanos, const char *fmt, ...);
144
+ uint64_t nanos, const char *fmt, ...);
145
__attribute__((format (printf, 4, 5)))
146
void trace_performance_leave_fl(const char *file, int line,
147
- uint64_t nanos, const char *fmt, ...);
147
+ uint64_t nanos, const char *fmt, ...);
148
static inline int trace_pass_fl(struct trace_key *key)
149
{
150
return key->fd || !key->initialized;
upload-pack.h
+2
-2
@@ -14,10 +14,10 @@ struct repository;
14
struct argv_array;
15
struct packet_reader;
16
int upload_pack_v2(struct repository *r, struct argv_array *keys,
17
- struct packet_reader *request);
17
+ struct packet_reader *request);
18
19
struct strbuf;
20
int upload_pack_advertise(struct repository *r,
21
- struct strbuf *value);
21
+ struct strbuf *value);
22
23
#endif /* UPLOAD_PACK_H */
vcs-svn/svndiff.h
+1
-1
@@ -5,6 +5,6 @@ struct line_buffer;
5
struct sliding_view;
6
7
int svndiff0_apply(struct line_buffer *delta, off_t delta_len,
8
- struct sliding_view *preimage, FILE *postimage);
8
+ struct sliding_view *preimage, FILE *postimage);
9
10
#endif
worktree.h
+7
-7
@@ -48,8 +48,8 @@ const char *get_worktree_git_dir(const struct worktree *wt);
48
* "arg". "prefix" must not be NULL.
49
*/
50
struct worktree *find_worktree(struct worktree **list,
51
- const char *prefix,
52
- const char *arg);
51
+ const char *prefix,
52
+ const char *arg);
53
54
/*
55
* Return true if the given worktree is the main one.
@@ -69,14 +69,14 @@ const char *worktree_lock_reason(struct worktree *wt);
69
* returned if "errmsg" is not NULL.
70
*/
71
int validate_worktree(const struct worktree *wt,
72
- struct strbuf *errmsg,
73
- unsigned flags);
72
+ struct strbuf *errmsg,
73
+ unsigned flags);
74
75
/*
76
* Update worktrees/xxx/gitdir with the new path.
77
*/
78
void update_worktree_location(struct worktree *wt,
79
- const char *path_);
79
+ const char *path_);
80
81
/*
82
* Free up the memory for worktree(s)
@@ -89,7 +89,7 @@ void free_worktrees(struct worktree **);
89
* or NULL otherwise. The result may be destroyed by the next call.
90
*/
91
const struct worktree *find_shared_symref(const char *symref,
92
- const char *target);
92
+ const char *target);
93
94
/*
95
* Similar to head_ref() for all HEADs _except_ one from the current
@@ -105,7 +105,7 @@ int is_worktree_being_bisected(const struct worktree *wt, const char *target);
105
* worktree instead of current one
106
*/
107
const char *worktree_git_path(const struct worktree *wt,
108
- const char *fmt, ...)
108
+ const char *fmt, ...)
109
__attribute__((format (printf, 2, 3)));
110
111
/*
xdiff-interface.h
+1
-1
@@ -47,7 +47,7 @@ void discard_hunk_line(void *priv,
47
* are treated for the comparision.
48
*/
49
int xdiff_compare_lines(const char *l1, long s1,
50
- const char *l2, long s2, long flags);
50
+ const char *l2, long s2, long flags);
51
52
/*
53
* Returns a hash of the string s of length len.