Skip to content

Commit f758a7f

Browse files
pcloudsgitster
authored andcommitted
diff.h: remove extern from function declaration
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 78d70d9 commit f758a7f

File tree

1 file changed

+60
-60
lines changed

1 file changed

+60
-60
lines changed

diff.h

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -258,15 +258,15 @@ const char *diff_line_prefix(struct diff_options *);
258258

259259
extern const char mime_boundary_leader[];
260260

261-
extern struct combine_diff_path *diff_tree_paths(
261+
struct combine_diff_path *diff_tree_paths(
262262
struct combine_diff_path *p, const struct object_id *oid,
263263
const struct object_id **parents_oid, int nparent,
264264
struct strbuf *base, struct diff_options *opt);
265-
extern int diff_tree_oid(const struct object_id *old_oid,
266-
const struct object_id *new_oid,
267-
const char *base, struct diff_options *opt);
268-
extern int diff_root_tree_oid(const struct object_id *new_oid, const char *base,
269-
struct diff_options *opt);
265+
int diff_tree_oid(const struct object_id *old_oid,
266+
const struct object_id *new_oid,
267+
const char *base, struct diff_options *opt);
268+
int diff_root_tree_oid(const struct object_id *new_oid, const char *base,
269+
struct diff_options *opt);
270270

271271
struct combine_diff_path {
272272
struct combine_diff_path *next;
@@ -283,33 +283,33 @@ struct combine_diff_path {
283283
st_add4(sizeof(struct combine_diff_path), (l), 1, \
284284
st_mult(sizeof(struct combine_diff_parent), (n)))
285285

286-
extern void show_combined_diff(struct combine_diff_path *elem, int num_parent,
287-
int dense, struct rev_info *);
286+
void show_combined_diff(struct combine_diff_path *elem, int num_parent,
287+
int dense, struct rev_info *);
288288

289-
extern void diff_tree_combined(const struct object_id *oid, const struct oid_array *parents, int dense, struct rev_info *rev);
289+
void diff_tree_combined(const struct object_id *oid, const struct oid_array *parents, int dense, struct rev_info *rev);
290290

291-
extern void diff_tree_combined_merge(const struct commit *commit, int dense, struct rev_info *rev);
291+
void diff_tree_combined_merge(const struct commit *commit, int dense, struct rev_info *rev);
292292

293293
void diff_set_mnemonic_prefix(struct diff_options *options, const char *a, const char *b);
294294

295-
extern int diff_can_quit_early(struct diff_options *);
295+
int diff_can_quit_early(struct diff_options *);
296296

297-
extern void diff_addremove(struct diff_options *,
298-
int addremove,
299-
unsigned mode,
300-
const struct object_id *oid,
301-
int oid_valid,
302-
const char *fullpath, unsigned dirty_submodule);
297+
void diff_addremove(struct diff_options *,
298+
int addremove,
299+
unsigned mode,
300+
const struct object_id *oid,
301+
int oid_valid,
302+
const char *fullpath, unsigned dirty_submodule);
303303

304-
extern void diff_change(struct diff_options *,
305-
unsigned mode1, unsigned mode2,
306-
const struct object_id *old_oid,
307-
const struct object_id *new_oid,
308-
int old_oid_valid, int new_oid_valid,
309-
const char *fullpath,
310-
unsigned dirty_submodule1, unsigned dirty_submodule2);
304+
void diff_change(struct diff_options *,
305+
unsigned mode1, unsigned mode2,
306+
const struct object_id *old_oid,
307+
const struct object_id *new_oid,
308+
int old_oid_valid, int new_oid_valid,
309+
const char *fullpath,
310+
unsigned dirty_submodule1, unsigned dirty_submodule2);
311311

312-
extern struct diff_filepair *diff_unmerge(struct diff_options *, const char *path);
312+
struct diff_filepair *diff_unmerge(struct diff_options *, const char *path);
313313

314314
#define DIFF_SETUP_REVERSE 1
315315
#define DIFF_SETUP_USE_CACHE 2
@@ -319,17 +319,17 @@ extern struct diff_filepair *diff_unmerge(struct diff_options *, const char *pat
319319
* Poor man's alternative to parse-option, to allow both stuck form
320320
* (--option=value) and separate form (--option value).
321321
*/
322-
extern int parse_long_opt(const char *opt, const char **argv,
323-
const char **optarg);
324-
325-
extern int git_diff_basic_config(const char *var, const char *value, void *cb);
326-
extern int git_diff_heuristic_config(const char *var, const char *value, void *cb);
327-
extern void init_diff_ui_defaults(void);
328-
extern int git_diff_ui_config(const char *var, const char *value, void *cb);
329-
extern void diff_setup(struct diff_options *);
330-
extern int diff_opt_parse(struct diff_options *, const char **, int, const char *);
331-
extern void diff_setup_done(struct diff_options *);
332-
extern int git_config_rename(const char *var, const char *value);
322+
int parse_long_opt(const char *opt, const char **argv,
323+
const char **optarg);
324+
325+
int git_diff_basic_config(const char *var, const char *value, void *cb);
326+
int git_diff_heuristic_config(const char *var, const char *value, void *cb);
327+
void init_diff_ui_defaults(void);
328+
int git_diff_ui_config(const char *var, const char *value, void *cb);
329+
void diff_setup(struct diff_options *);
330+
int diff_opt_parse(struct diff_options *, const char **, int, const char *);
331+
void diff_setup_done(struct diff_options *);
332+
int git_config_rename(const char *var, const char *value);
333333

334334
#define DIFF_DETECT_RENAME 1
335335
#define DIFF_DETECT_COPY 2
@@ -347,8 +347,8 @@ extern int git_config_rename(const char *var, const char *value);
347347

348348
#define DIFF_PICKAXE_IGNORE_CASE 32
349349

350-
extern void diffcore_std(struct diff_options *);
351-
extern void diffcore_fix_diff_index(struct diff_options *);
350+
void diffcore_std(struct diff_options *);
351+
void diffcore_fix_diff_index(struct diff_options *);
352352

353353
#define COMMON_DIFF_OPTIONS_HELP \
354354
"\ncommon diff options:\n" \
@@ -378,9 +378,9 @@ extern void diffcore_fix_diff_index(struct diff_options *);
378378
" show all files diff when -S is used and hit is found.\n" \
379379
" -a --text treat all files as text.\n"
380380

381-
extern int diff_queue_is_empty(void);
382-
extern void diff_flush(struct diff_options*);
383-
extern void diff_warn_rename_limit(const char *varname, int needed, int degraded_cc);
381+
int diff_queue_is_empty(void);
382+
void diff_flush(struct diff_options*);
383+
void diff_warn_rename_limit(const char *varname, int needed, int degraded_cc);
384384

385385
/* diff-raw status letters */
386386
#define DIFF_STATUS_ADDED 'A'
@@ -402,24 +402,24 @@ extern void diff_warn_rename_limit(const char *varname, int needed, int degraded
402402
* This is different from find_unique_abbrev() in that
403403
* it stuffs the result with dots for alignment.
404404
*/
405-
extern const char *diff_aligned_abbrev(const struct object_id *sha1, int);
405+
const char *diff_aligned_abbrev(const struct object_id *sha1, int);
406406

407407
/* do not report anything on removed paths */
408408
#define DIFF_SILENT_ON_REMOVED 01
409409
/* report racily-clean paths as modified */
410410
#define DIFF_RACY_IS_MODIFIED 02
411-
extern int run_diff_files(struct rev_info *revs, unsigned int option);
412-
extern int run_diff_index(struct rev_info *revs, int cached);
411+
int run_diff_files(struct rev_info *revs, unsigned int option);
412+
int run_diff_index(struct rev_info *revs, int cached);
413413

414-
extern int do_diff_cache(const struct object_id *, struct diff_options *);
415-
extern int diff_flush_patch_id(struct diff_options *, struct object_id *, int);
414+
int do_diff_cache(const struct object_id *, struct diff_options *);
415+
int diff_flush_patch_id(struct diff_options *, struct object_id *, int);
416416

417-
extern int diff_result_code(struct diff_options *, int);
417+
int diff_result_code(struct diff_options *, int);
418418

419-
extern void diff_no_index(struct rev_info *, int, const char **);
419+
void diff_no_index(struct rev_info *, int, const char **);
420420

421-
extern int index_differs_from(const char *def, const struct diff_flags *flags,
422-
int ita_invisible_in_index);
421+
int index_differs_from(const char *def, const struct diff_flags *flags,
422+
int ita_invisible_in_index);
423423

424424
/*
425425
* Fill the contents of the filespec "df", respecting any textconv defined by
@@ -432,30 +432,30 @@ extern int index_differs_from(const char *def, const struct diff_flags *flags,
432432
* struct. If it is non-NULL, then "outbuf" points to a newly allocated buffer
433433
* that should be freed by the caller.
434434
*/
435-
extern size_t fill_textconv(struct userdiff_driver *driver,
436-
struct diff_filespec *df,
437-
char **outbuf);
435+
size_t fill_textconv(struct userdiff_driver *driver,
436+
struct diff_filespec *df,
437+
char **outbuf);
438438

439439
/*
440440
* Look up the userdiff driver for the given filespec, and return it if
441441
* and only if it has textconv enabled (otherwise return NULL). The result
442442
* can be passed to fill_textconv().
443443
*/
444-
extern struct userdiff_driver *get_textconv(struct diff_filespec *one);
444+
struct userdiff_driver *get_textconv(struct diff_filespec *one);
445445

446446
/*
447447
* Prepare diff_filespec and convert it using diff textconv API
448448
* if the textconv driver exists.
449449
* Return 1 if the conversion succeeds, 0 otherwise.
450450
*/
451-
extern int textconv_object(const char *path, unsigned mode, const struct object_id *oid, int oid_valid, char **buf, unsigned long *buf_size);
451+
int textconv_object(const char *path, unsigned mode, const struct object_id *oid, int oid_valid, char **buf, unsigned long *buf_size);
452452

453-
extern int parse_rename_score(const char **cp_p);
453+
int parse_rename_score(const char **cp_p);
454454

455-
extern long parse_algorithm_value(const char *value);
455+
long parse_algorithm_value(const char *value);
456456

457-
extern void print_stat_summary(FILE *fp, int files,
458-
int insertions, int deletions);
459-
extern void setup_diff_pager(struct diff_options *);
457+
void print_stat_summary(FILE *fp, int files,
458+
int insertions, int deletions);
459+
void setup_diff_pager(struct diff_options *);
460460

461461
#endif /* DIFF_H */

0 commit comments

Comments
 (0)