{"thread":{"id":"48806","subject":"[PATCH 00/12] Kill the_index part2, header file cleanup","startedAt":"2018-06-30T09:20:45Z","lastAt":"2018-08-03T17:13:57Z","messageCount":17,"participants":["Nguyễn Thái Ngọc Duy","Brandon Williams","Duy Nguyen","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":12},"messages":[{"id":"351437","messageId":"20180630092031.29910-1-pclouds@gmail.com","threadId":"48806","inReplyTo":null,"subject":"[PATCH 00/12] Kill the_index part2, header file cleanup","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2018-06-30T09:20:19Z","receivedAt":"2018-06-30T09:20:45Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Like part 1 this is also boring. I wanted to drop these 'extern'\neverywhere actually, so before I touched any header file in this\nseries, I did a clean up first. This is the result (and to reduce diff\nnoise later)\n\nNguyễn Thái Ngọc Duy (12):\n  apply.h: drop extern on func declaration\n  attr.h: drop extern from function declaration\n  blame.h: drop extern on func declaration\n  cache-tree.h: drop extern from function declaration\n  convert.h: drop 'extern' from function declaration\n  diffcore.h: drop extern from function declaration\n  diff.h: remove extern from function declaration\n  line-range.h: drop extern from function declaration\n  rerere.h: drop extern from function declaration\n  repository.h: drop extern from function declaration\n  revision.h: drop extern from function declaration\n  submodule.h: drop extern from function declaration\n\n apply.h      |  23 +++++-----\n attr.h       |  24 +++++------\n blame.h      |  28 ++++++------\n cache-tree.h |   2 +-\n convert.h    |  56 ++++++++++++------------\n diff.h       | 120 +++++++++++++++++++++++++--------------------------\n diffcore.h   |  50 ++++++++++-----------\n line-range.h |  12 +++---\n repository.h |  25 +++++------\n rerere.h     |  14 +++---\n revision.h   |  69 ++++++++++++++---------------\n submodule.h  | 112 +++++++++++++++++++++++------------------------\n 12 files changed, 269 insertions(+), 266 deletions(-)\n\n-- \n2.18.0.rc2.476.g39500d3211\n\n"},{"id":"351438","messageId":"20180630092031.29910-3-pclouds@gmail.com","threadId":"48806","inReplyTo":"20180630092031.29910-1-pclouds@gmail.com","subject":"[PATCH 02/12] attr.h: drop extern from function declaration","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2018-06-30T09:20:21Z","receivedAt":"2018-06-30T09:20:50Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n attr.h | 24 ++++++++++++------------\n 1 file changed, 12 insertions(+), 12 deletions(-)\n\ndiff --git a/attr.h b/attr.h\nindex 442d464db6..46340010bb 100644\n--- a/attr.h\n+++ b/attr.h\n@@ -42,31 +42,31 @@ struct attr_check {\n \tstruct attr_stack *stack;\n };\n \n-extern struct attr_check *attr_check_alloc(void);\n-extern struct attr_check *attr_check_initl(const char *, ...);\n-extern struct attr_check *attr_check_dup(const struct attr_check *check);\n+struct attr_check *attr_check_alloc(void);\n+struct attr_check *attr_check_initl(const char *, ...);\n+struct attr_check *attr_check_dup(const struct attr_check *check);\n \n-extern struct attr_check_item *attr_check_append(struct attr_check *check,\n-\t\t\t\t\t\t const struct git_attr *attr);\n+struct attr_check_item *attr_check_append(struct attr_check *check,\n+\t\t\t\t\t  const struct git_attr *attr);\n \n-extern void attr_check_reset(struct attr_check *check);\n-extern void attr_check_clear(struct attr_check *check);\n-extern void attr_check_free(struct attr_check *check);\n+void attr_check_reset(struct attr_check *check);\n+void attr_check_clear(struct attr_check *check);\n+void attr_check_free(struct attr_check *check);\n \n /*\n  * Return the name of the attribute represented by the argument.  The\n  * return value is a pointer to a null-delimited string that is part\n  * of the internal data structure; it should not be modified or freed.\n  */\n-extern const char *git_attr_name(const struct git_attr *);\n+const char *git_attr_name(const struct git_attr *);\n \n-extern int git_check_attr(const char *path, struct attr_check *check);\n+int git_check_attr(const char *path, struct attr_check *check);\n \n /*\n  * Retrieve all attributes that apply to the specified path.\n  * check holds the attributes and their values.\n  */\n-extern void git_all_attrs(const char *path, struct attr_check *check);\n+void git_all_attrs(const char *path, struct attr_check *check);\n \n enum git_attr_direction {\n \tGIT_ATTR_CHECKIN,\n@@ -76,6 +76,6 @@ enum git_attr_direction {\n void git_attr_set_direction(enum git_attr_direction new_direction,\n \t\t\t    struct index_state *istate);\n \n-extern void attr_start(void);\n+void attr_start(void);\n \n #endif /* ATTR_H */\n-- \n2.18.0.rc2.476.g39500d3211\n\n"},{"id":"351439","messageId":"20180630092031.29910-2-pclouds@gmail.com","threadId":"48806","inReplyTo":"20180630092031.29910-1-pclouds@gmail.com","subject":"[PATCH 01/12] apply.h: drop extern on func declaration","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2018-06-30T09:20:20Z","receivedAt":"2018-06-30T09:20:50Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n apply.h | 23 +++++++++++------------\n 1 file changed, 11 insertions(+), 12 deletions(-)\n\ndiff --git a/apply.h b/apply.h\nindex dc4a019057..025dfed7ab 100644\n--- a/apply.h\n+++ b/apply.h\n@@ -110,14 +110,14 @@ struct apply_state {\n \tint applied_after_fixing_ws;\n };\n \n-extern int apply_parse_options(int argc, const char **argv,\n-\t\t\t       struct apply_state *state,\n-\t\t\t       int *force_apply, int *options,\n-\t\t\t       const char * const *apply_usage);\n-extern int init_apply_state(struct apply_state *state,\n-\t\t\t    const char *prefix);\n-extern void clear_apply_state(struct apply_state *state);\n-extern int check_apply_state(struct apply_state *state, int force_apply);\n+int apply_parse_options(int argc, const char **argv,\n+\t\t\tstruct apply_state *state,\n+\t\t\tint *force_apply, int *options,\n+\t\t\tconst char * const *apply_usage);\n+int init_apply_state(struct apply_state *state,\n+\t\t     const char *prefix);\n+void clear_apply_state(struct apply_state *state);\n+int check_apply_state(struct apply_state *state, int force_apply);\n \n /*\n  * Some aspects of the apply behavior are controlled by the following\n@@ -126,9 +126,8 @@ extern int check_apply_state(struct apply_state *state, int force_apply);\n #define APPLY_OPT_INACCURATE_EOF\t(1<<0) /* accept inaccurate eof */\n #define APPLY_OPT_RECOUNT\t\t(1<<1) /* accept inaccurate line count */\n \n-extern int apply_all_patches(struct apply_state *state,\n-\t\t\t     int argc,\n-\t\t\t     const char **argv,\n-\t\t\t     int options);\n+int apply_all_patches(struct apply_state *state,\n+\t\t      int argc, const char **argv,\n+\t\t      int options);\n \n #endif\n-- \n2.18.0.rc2.476.g39500d3211\n\n"},{"id":"351440","messageId":"20180630092031.29910-4-pclouds@gmail.com","threadId":"48806","inReplyTo":"20180630092031.29910-1-pclouds@gmail.com","subject":"[PATCH 03/12] blame.h: drop extern on func declaration","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2018-06-30T09:20:22Z","receivedAt":"2018-06-30T09:20:50Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n blame.h | 28 ++++++++++++++++------------\n 1 file changed, 16 insertions(+), 12 deletions(-)\n\ndiff --git a/blame.h b/blame.h\nindex a6c915c277..8c1e14980d 100644\n--- a/blame.h\n+++ b/blame.h\n@@ -159,17 +159,21 @@ static inline struct blame_origin *blame_origin_incref(struct blame_origin *o)\n \t\to->refcnt++;\n \treturn o;\n }\n-extern void blame_origin_decref(struct blame_origin *o);\n-\n-extern void blame_coalesce(struct blame_scoreboard *sb);\n-extern void blame_sort_final(struct blame_scoreboard *sb);\n-extern unsigned blame_entry_score(struct blame_scoreboard *sb, struct blame_entry *e);\n-extern void assign_blame(struct blame_scoreboard *sb, int opt);\n-extern const char *blame_nth_line(struct blame_scoreboard *sb, long lno);\n-\n-extern void init_scoreboard(struct blame_scoreboard *sb);\n-extern void setup_scoreboard(struct blame_scoreboard *sb, const char *path, struct blame_origin **orig);\n-\n-extern struct blame_entry *blame_entry_prepend(struct blame_entry *head, long start, long end, struct blame_origin *o);\n+void blame_origin_decref(struct blame_origin *o);\n+\n+void blame_coalesce(struct blame_scoreboard *sb);\n+void blame_sort_final(struct blame_scoreboard *sb);\n+unsigned blame_entry_score(struct blame_scoreboard *sb, struct blame_entry *e);\n+void assign_blame(struct blame_scoreboard *sb, int opt);\n+const char *blame_nth_line(struct blame_scoreboard *sb, long lno);\n+\n+void init_scoreboard(struct blame_scoreboard *sb);\n+void setup_scoreboard(struct blame_scoreboard *sb,\n+\t\t      const char *path,\n+\t\t      struct blame_origin **orig);\n+\n+struct blame_entry *blame_entry_prepend(struct blame_entry *head,\n+\t\t\t\t\tlong start, long end,\n+\t\t\t\t\tstruct blame_origin *o);\n \n #endif /* BLAME_H */\n-- \n2.18.0.rc2.476.g39500d3211\n\n"},{"id":"351441","messageId":"20180630092031.29910-6-pclouds@gmail.com","threadId":"48806","inReplyTo":"20180630092031.29910-1-pclouds@gmail.com","subject":"[PATCH 05/12] convert.h: drop 'extern' from function declaration","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2018-06-30T09:20:24Z","receivedAt":"2018-06-30T09:20:56Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n convert.h | 56 ++++++++++++++++++++++++++++---------------------------\n 1 file changed, 29 insertions(+), 27 deletions(-)\n\ndiff --git a/convert.h b/convert.h\nindex 01385d9288..0a0fa15b58 100644\n--- a/convert.h\n+++ b/convert.h\n@@ -57,35 +57,36 @@ struct delayed_checkout {\n \n extern enum eol core_eol;\n extern char *check_roundtrip_encoding;\n-extern const char *get_cached_convert_stats_ascii(const struct index_state *istate,\n-\t\t\t\t\t\t  const char *path);\n-extern const char *get_wt_convert_stats_ascii(const char *path);\n-extern const char *get_convert_attr_ascii(const char *path);\n+const char *get_cached_convert_stats_ascii(const struct index_state *istate,\n+\t\t\t\t\t   const char *path);\n+const char *get_wt_convert_stats_ascii(const char *path);\n+const char *get_convert_attr_ascii(const char *path);\n \n /* returns 1 if *dst was used */\n-extern int convert_to_git(const struct index_state *istate,\n-\t\t\t  const char *path, const char *src, size_t len,\n-\t\t\t  struct strbuf *dst, int conv_flags);\n-extern int convert_to_working_tree(const char *path, const char *src,\n-\t\t\t\t   size_t len, struct strbuf *dst);\n-extern int async_convert_to_working_tree(const char *path, const char *src,\n-\t\t\t\t\t size_t len, struct strbuf *dst,\n-\t\t\t\t\t void *dco);\n-extern int async_query_available_blobs(const char *cmd, struct string_list *available_paths);\n-extern int renormalize_buffer(const struct index_state *istate,\n-\t\t\t      const char *path, const char *src, size_t len,\n-\t\t\t      struct strbuf *dst);\n+int convert_to_git(const struct index_state *istate,\n+\t\t   const char *path, const char *src, size_t len,\n+\t\t   struct strbuf *dst, int conv_flags);\n+int convert_to_working_tree(const char *path, const char *src,\n+\t\t\t    size_t len, struct strbuf *dst);\n+int async_convert_to_working_tree(const char *path, const char *src,\n+\t\t\t\t  size_t len, struct strbuf *dst,\n+\t\t\t\t  void *dco);\n+int async_query_available_blobs(const char *cmd,\n+\t\t\t\tstruct string_list *available_paths);\n+int renormalize_buffer(const struct index_state *istate,\n+\t\t       const char *path, const char *src, size_t len,\n+\t\t       struct strbuf *dst);\n static inline int would_convert_to_git(const struct index_state *istate,\n \t\t\t\t       const char *path)\n {\n \treturn convert_to_git(istate, path, NULL, 0, NULL, 0);\n }\n /* Precondition: would_convert_to_git_filter_fd(path) == true */\n-extern void convert_to_git_filter_fd(const struct index_state *istate,\n-\t\t\t\t     const char *path, int fd,\n-\t\t\t\t     struct strbuf *dst,\n-\t\t\t\t     int conv_flags);\n-extern int would_convert_to_git_filter_fd(const char *path);\n+void convert_to_git_filter_fd(const struct index_state *istate,\n+\t\t\t      const char *path, int fd,\n+\t\t\t      struct strbuf *dst,\n+\t\t\t      int conv_flags);\n+int would_convert_to_git_filter_fd(const char *path);\n \n /*****************************************************************\n  *\n@@ -95,9 +96,10 @@ extern int would_convert_to_git_filter_fd(const char *path);\n \n struct stream_filter; /* opaque */\n \n-extern struct stream_filter *get_stream_filter(const char *path, const struct object_id *);\n-extern void free_stream_filter(struct stream_filter *);\n-extern int is_null_stream_filter(struct stream_filter *);\n+struct stream_filter *get_stream_filter(const char *path,\n+\t\t\t\t\tconst struct object_id *);\n+void free_stream_filter(struct stream_filter *);\n+int is_null_stream_filter(struct stream_filter *);\n \n /*\n  * Use as much input up to *isize_p and fill output up to *osize_p;\n@@ -111,8 +113,8 @@ extern int is_null_stream_filter(struct stream_filter *);\n  * such filters know there is no more input coming and it is time for\n  * them to produce the remaining output based on the buffered input.\n  */\n-extern int stream_filter(struct stream_filter *,\n-\t\t\t const char *input, size_t *isize_p,\n-\t\t\t char *output, size_t *osize_p);\n+int stream_filter(struct stream_filter *,\n+\t\t  const char *input, size_t *isize_p,\n+\t\t  char *output, size_t *osize_p);\n \n #endif /* CONVERT_H */\n-- \n2.18.0.rc2.476.g39500d3211\n\n"},{"id":"351442","messageId":"20180630092031.29910-7-pclouds@gmail.com","threadId":"48806","inReplyTo":"20180630092031.29910-1-pclouds@gmail.com","subject":"[PATCH 06/12] diffcore.h: drop extern from function declaration","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2018-06-30T09:20:25Z","receivedAt":"2018-06-30T09:21:00Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n diffcore.h | 50 +++++++++++++++++++++++++-------------------------\n 1 file changed, 25 insertions(+), 25 deletions(-)\n\ndiff --git a/diffcore.h b/diffcore.h\nindex a30da161da..81281a398b 100644\n--- a/diffcore.h\n+++ b/diffcore.h\n@@ -50,17 +50,17 @@ struct diff_filespec {\n \tstruct userdiff_driver *driver;\n };\n \n-extern struct diff_filespec *alloc_filespec(const char *);\n-extern void free_filespec(struct diff_filespec *);\n-extern void fill_filespec(struct diff_filespec *, const struct object_id *,\n-\t\t\t  int, unsigned short);\n+struct diff_filespec *alloc_filespec(const char *);\n+void free_filespec(struct diff_filespec *);\n+void fill_filespec(struct diff_filespec *, const struct object_id *,\n+\t\t   int, unsigned short);\n \n #define CHECK_SIZE_ONLY 1\n #define CHECK_BINARY    2\n-extern int diff_populate_filespec(struct diff_filespec *, unsigned int);\n-extern void diff_free_filespec_data(struct diff_filespec *);\n-extern void diff_free_filespec_blob(struct diff_filespec *);\n-extern int diff_filespec_is_binary(struct diff_filespec *);\n+int diff_populate_filespec(struct diff_filespec *, unsigned int);\n+void diff_free_filespec_data(struct diff_filespec *);\n+void diff_free_filespec_blob(struct diff_filespec *);\n+int diff_filespec_is_binary(struct diff_filespec *);\n \n struct diff_filepair {\n \tstruct diff_filespec *one;\n@@ -86,9 +86,9 @@ struct diff_filepair {\n \n #define DIFF_PAIR_MODE_CHANGED(p) ((p)->one->mode != (p)->two->mode)\n \n-extern void diff_free_filepair(struct diff_filepair *);\n+void diff_free_filepair(struct diff_filepair *);\n \n-extern int diff_unmodified_pair(struct diff_filepair *);\n+int diff_unmodified_pair(struct diff_filepair *);\n \n struct diff_queue_struct {\n \tstruct diff_filepair **queue;\n@@ -102,16 +102,16 @@ struct diff_queue_struct {\n \t} while (0)\n \n extern struct diff_queue_struct diff_queued_diff;\n-extern struct diff_filepair *diff_queue(struct diff_queue_struct *,\n-\t\t\t\t\tstruct diff_filespec *,\n-\t\t\t\t\tstruct diff_filespec *);\n-extern void diff_q(struct diff_queue_struct *, struct diff_filepair *);\n+struct diff_filepair *diff_queue(struct diff_queue_struct *,\n+\t\t\t\t struct diff_filespec *,\n+\t\t\t\t struct diff_filespec *);\n+void diff_q(struct diff_queue_struct *, struct diff_filepair *);\n \n-extern void diffcore_break(int);\n-extern void diffcore_rename(struct diff_options *);\n-extern void diffcore_merge_broken(void);\n-extern void diffcore_pickaxe(struct diff_options *);\n-extern void diffcore_order(const char *orderfile);\n+void diffcore_break(int);\n+void diffcore_rename(struct diff_options *);\n+void diffcore_merge_broken(void);\n+void diffcore_pickaxe(struct diff_options *);\n+void diffcore_order(const char *orderfile);\n \n /* low-level interface to diffcore_order */\n struct obj_order {\n@@ -138,11 +138,11 @@ void diff_debug_queue(const char *, struct diff_queue_struct *);\n #define diff_debug_queue(a,b) do { /* nothing */ } while (0)\n #endif\n \n-extern int diffcore_count_changes(struct diff_filespec *src,\n-\t\t\t\t  struct diff_filespec *dst,\n-\t\t\t\t  void **src_count_p,\n-\t\t\t\t  void **dst_count_p,\n-\t\t\t\t  unsigned long *src_copied,\n-\t\t\t\t  unsigned long *literal_added);\n+int diffcore_count_changes(struct diff_filespec *src,\n+\t\t\t   struct diff_filespec *dst,\n+\t\t\t   void **src_count_p,\n+\t\t\t   void **dst_count_p,\n+\t\t\t   unsigned long *src_copied,\n+\t\t\t   unsigned long *literal_added);\n \n #endif\n-- \n2.18.0.rc2.476.g39500d3211\n\n"},{"id":"351443","messageId":"20180630092031.29910-5-pclouds@gmail.com","threadId":"48806","inReplyTo":"20180630092031.29910-1-pclouds@gmail.com","subject":"[PATCH 04/12] cache-tree.h: drop extern from function declaration","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2018-06-30T09:20:23Z","receivedAt":"2018-06-30T09:21:05Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n cache-tree.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/cache-tree.h b/cache-tree.h\nindex cfd5328cc9..9799e894f7 100644\n--- a/cache-tree.h\n+++ b/cache-tree.h\n@@ -51,6 +51,6 @@ int write_index_as_tree(struct object_id *oid, struct index_state *index_state,\n int write_cache_as_tree(struct object_id *oid, int flags, const char *prefix);\n void prime_cache_tree(struct index_state *, struct tree *);\n \n-extern int cache_tree_matches_traversal(struct cache_tree *, struct name_entry *ent, struct traverse_info *info);\n+int cache_tree_matches_traversal(struct cache_tree *, struct name_entry *ent, struct traverse_info *info);\n \n #endif\n-- \n2.18.0.rc2.476.g39500d3211\n\n"},{"id":"351445","messageId":"20180630092031.29910-8-pclouds@gmail.com","threadId":"48806","inReplyTo":"20180630092031.29910-1-pclouds@gmail.com","subject":"[PATCH 07/12] diff.h: remove extern from function declaration","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2018-06-30T09:20:26Z","receivedAt":"2018-06-30T09:21:06Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n diff.h | 120 ++++++++++++++++++++++++++++-----------------------------\n 1 file changed, 60 insertions(+), 60 deletions(-)\n\ndiff --git a/diff.h b/diff.h\nindex dedac472ca..4a8885fb0f 100644\n--- a/diff.h\n+++ b/diff.h\n@@ -253,15 +253,15 @@ const char *diff_line_prefix(struct diff_options *);\n \n extern const char mime_boundary_leader[];\n \n-extern struct combine_diff_path *diff_tree_paths(\n+struct combine_diff_path *diff_tree_paths(\n \tstruct combine_diff_path *p, const struct object_id *oid,\n \tconst struct object_id **parents_oid, int nparent,\n \tstruct strbuf *base, struct diff_options *opt);\n-extern int diff_tree_oid(const struct object_id *old_oid,\n-\t\t\t const struct object_id *new_oid,\n-\t\t\t const char *base, struct diff_options *opt);\n-extern int diff_root_tree_oid(const struct object_id *new_oid, const char *base,\n-\t\t\t      struct diff_options *opt);\n+int diff_tree_oid(const struct object_id *old_oid,\n+\t\t  const struct object_id *new_oid,\n+\t\t  const char *base, struct diff_options *opt);\n+int diff_root_tree_oid(const struct object_id *new_oid, const char *base,\n+\t\t       struct diff_options *opt);\n \n struct combine_diff_path {\n \tstruct combine_diff_path *next;\n@@ -278,33 +278,33 @@ struct combine_diff_path {\n \tst_add4(sizeof(struct combine_diff_path), (l), 1, \\\n \t\tst_mult(sizeof(struct combine_diff_parent), (n)))\n \n-extern void show_combined_diff(struct combine_diff_path *elem, int num_parent,\n-\t\t\t      int dense, struct rev_info *);\n+void show_combined_diff(struct combine_diff_path *elem, int num_parent,\n+\t\t\tint dense, struct rev_info *);\n \n-extern void diff_tree_combined(const struct object_id *oid, const struct oid_array *parents, int dense, struct rev_info *rev);\n+void diff_tree_combined(const struct object_id *oid, const struct oid_array *parents, int dense, struct rev_info *rev);\n \n-extern void diff_tree_combined_merge(const struct commit *commit, int dense, struct rev_info *rev);\n+void diff_tree_combined_merge(const struct commit *commit, int dense, struct rev_info *rev);\n \n void diff_set_mnemonic_prefix(struct diff_options *options, const char *a, const char *b);\n \n-extern int diff_can_quit_early(struct diff_options *);\n+int diff_can_quit_early(struct diff_options *);\n \n-extern void diff_addremove(struct diff_options *,\n-\t\t\t   int addremove,\n-\t\t\t   unsigned mode,\n-\t\t\t   const struct object_id *oid,\n-\t\t\t   int oid_valid,\n-\t\t\t   const char *fullpath, unsigned dirty_submodule);\n+void diff_addremove(struct diff_options *,\n+\t\t    int addremove,\n+\t\t    unsigned mode,\n+\t\t    const struct object_id *oid,\n+\t\t    int oid_valid,\n+\t\t    const char *fullpath, unsigned dirty_submodule);\n \n-extern void diff_change(struct diff_options *,\n-\t\t\tunsigned mode1, unsigned mode2,\n-\t\t\tconst struct object_id *old_oid,\n-\t\t\tconst struct object_id *new_oid,\n-\t\t\tint old_oid_valid, int new_oid_valid,\n-\t\t\tconst char *fullpath,\n-\t\t\tunsigned dirty_submodule1, unsigned dirty_submodule2);\n+void diff_change(struct diff_options *,\n+\t\t unsigned mode1, unsigned mode2,\n+\t\t const struct object_id *old_oid,\n+\t\t const struct object_id *new_oid,\n+\t\t int old_oid_valid, int new_oid_valid,\n+\t\t const char *fullpath,\n+\t\t unsigned dirty_submodule1, unsigned dirty_submodule2);\n \n-extern struct diff_filepair *diff_unmerge(struct diff_options *, const char *path);\n+struct diff_filepair *diff_unmerge(struct diff_options *, const char *path);\n \n #define DIFF_SETUP_REVERSE      \t1\n #define DIFF_SETUP_USE_CACHE\t\t2\n@@ -314,17 +314,17 @@ extern struct diff_filepair *diff_unmerge(struct diff_options *, const char *pat\n  * Poor man's alternative to parse-option, to allow both stuck form\n  * (--option=value) and separate form (--option value).\n  */\n-extern int parse_long_opt(const char *opt, const char **argv,\n-\t\t\t const char **optarg);\n-\n-extern int git_diff_basic_config(const char *var, const char *value, void *cb);\n-extern int git_diff_heuristic_config(const char *var, const char *value, void *cb);\n-extern void init_diff_ui_defaults(void);\n-extern int git_diff_ui_config(const char *var, const char *value, void *cb);\n-extern void diff_setup(struct diff_options *);\n-extern int diff_opt_parse(struct diff_options *, const char **, int, const char *);\n-extern void diff_setup_done(struct diff_options *);\n-extern int git_config_rename(const char *var, const char *value);\n+int parse_long_opt(const char *opt, const char **argv,\n+\t\t   const char **optarg);\n+\n+int git_diff_basic_config(const char *var, const char *value, void *cb);\n+int git_diff_heuristic_config(const char *var, const char *value, void *cb);\n+void init_diff_ui_defaults(void);\n+int git_diff_ui_config(const char *var, const char *value, void *cb);\n+void diff_setup(struct diff_options *);\n+int diff_opt_parse(struct diff_options *, const char **, int, const char *);\n+void diff_setup_done(struct diff_options *);\n+int git_config_rename(const char *var, const char *value);\n \n #define DIFF_DETECT_RENAME\t1\n #define DIFF_DETECT_COPY\t2\n@@ -342,8 +342,8 @@ extern int git_config_rename(const char *var, const char *value);\n \n #define DIFF_PICKAXE_IGNORE_CASE\t32\n \n-extern void diffcore_std(struct diff_options *);\n-extern void diffcore_fix_diff_index(struct diff_options *);\n+void diffcore_std(struct diff_options *);\n+void diffcore_fix_diff_index(struct diff_options *);\n \n #define COMMON_DIFF_OPTIONS_HELP \\\n \"\\ncommon diff options:\\n\" \\\n@@ -373,9 +373,9 @@ extern void diffcore_fix_diff_index(struct diff_options *);\n \"                show all files diff when -S is used and hit is found.\\n\" \\\n \"  -a  --text    treat all files as text.\\n\"\n \n-extern int diff_queue_is_empty(void);\n-extern void diff_flush(struct diff_options*);\n-extern void diff_warn_rename_limit(const char *varname, int needed, int degraded_cc);\n+int diff_queue_is_empty(void);\n+void diff_flush(struct diff_options*);\n+void diff_warn_rename_limit(const char *varname, int needed, int degraded_cc);\n \n /* diff-raw status letters */\n #define DIFF_STATUS_ADDED\t\t'A'\n@@ -397,24 +397,24 @@ extern void diff_warn_rename_limit(const char *varname, int needed, int degraded\n  * This is different from find_unique_abbrev() in that\n  * it stuffs the result with dots for alignment.\n  */\n-extern const char *diff_aligned_abbrev(const struct object_id *sha1, int);\n+const char *diff_aligned_abbrev(const struct object_id *sha1, int);\n \n /* do not report anything on removed paths */\n #define DIFF_SILENT_ON_REMOVED 01\n /* report racily-clean paths as modified */\n #define DIFF_RACY_IS_MODIFIED 02\n-extern int run_diff_files(struct rev_info *revs, unsigned int option);\n-extern int run_diff_index(struct rev_info *revs, int cached);\n+int run_diff_files(struct rev_info *revs, unsigned int option);\n+int run_diff_index(struct rev_info *revs, int cached);\n \n-extern int do_diff_cache(const struct object_id *, struct diff_options *);\n-extern int diff_flush_patch_id(struct diff_options *, struct object_id *, int);\n+int do_diff_cache(const struct object_id *, struct diff_options *);\n+int diff_flush_patch_id(struct diff_options *, struct object_id *, int);\n \n-extern int diff_result_code(struct diff_options *, int);\n+int diff_result_code(struct diff_options *, int);\n \n-extern void diff_no_index(struct rev_info *, int, const char **);\n+void diff_no_index(struct rev_info *, int, const char **);\n \n-extern int index_differs_from(const char *def, const struct diff_flags *flags,\n-\t\t\t      int ita_invisible_in_index);\n+int index_differs_from(const char *def, const struct diff_flags *flags,\n+\t\t       int ita_invisible_in_index);\n \n /*\n  * Fill the contents of the filespec \"df\", respecting any textconv defined by\n@@ -427,30 +427,30 @@ extern int index_differs_from(const char *def, const struct diff_flags *flags,\n  * struct. If it is non-NULL, then \"outbuf\" points to a newly allocated buffer\n  * that should be freed by the caller.\n  */\n-extern size_t fill_textconv(struct userdiff_driver *driver,\n-\t\t\t    struct diff_filespec *df,\n-\t\t\t    char **outbuf);\n+size_t fill_textconv(struct userdiff_driver *driver,\n+\t\t     struct diff_filespec *df,\n+\t\t     char **outbuf);\n \n /*\n  * Look up the userdiff driver for the given filespec, and return it if\n  * and only if it has textconv enabled (otherwise return NULL). The result\n  * can be passed to fill_textconv().\n  */\n-extern struct userdiff_driver *get_textconv(struct diff_filespec *one);\n+struct userdiff_driver *get_textconv(struct diff_filespec *one);\n \n /*\n  * Prepare diff_filespec and convert it using diff textconv API\n  * if the textconv driver exists.\n  * Return 1 if the conversion succeeds, 0 otherwise.\n  */\n-extern int textconv_object(const char *path, unsigned mode, const struct object_id *oid, int oid_valid, char **buf, unsigned long *buf_size);\n+int textconv_object(const char *path, unsigned mode, const struct object_id *oid, int oid_valid, char **buf, unsigned long *buf_size);\n \n-extern int parse_rename_score(const char **cp_p);\n+int parse_rename_score(const char **cp_p);\n \n-extern long parse_algorithm_value(const char *value);\n+long parse_algorithm_value(const char *value);\n \n-extern void print_stat_summary(FILE *fp, int files,\n-\t\t\t       int insertions, int deletions);\n-extern void setup_diff_pager(struct diff_options *);\n+void print_stat_summary(FILE *fp, int files,\n+\t\t\tint insertions, int deletions);\n+void setup_diff_pager(struct diff_options *);\n \n #endif /* DIFF_H */\n-- \n2.18.0.rc2.476.g39500d3211\n\n"},{"id":"351444","messageId":"20180630092031.29910-11-pclouds@gmail.com","threadId":"48806","inReplyTo":"20180630092031.29910-1-pclouds@gmail.com","subject":"[PATCH 10/12] repository.h: drop extern from function declaration","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2018-06-30T09:20:29Z","receivedAt":"2018-06-30T09:21:07Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n repository.h | 25 +++++++++++--------------\n 1 file changed, 11 insertions(+), 14 deletions(-)\n\ndiff --git a/repository.h b/repository.h\nindex f2646f0c52..f60d1cafbd 100644\n--- a/repository.h\n+++ b/repository.h\n@@ -94,19 +94,16 @@ struct set_gitdir_args {\n \tconst char *alternate_db;\n };\n \n-extern void repo_set_gitdir(struct repository *repo,\n-\t\t\t    const char *root,\n-\t\t\t    const struct set_gitdir_args *extra_args);\n-extern void repo_set_worktree(struct repository *repo, const char *path);\n-extern void repo_set_hash_algo(struct repository *repo, int algo);\n-extern void initialize_the_repository(void);\n-extern int repo_init(struct repository *r,\n-\t\t     const char *gitdir,\n-\t\t     const char *worktree);\n-extern int repo_submodule_init(struct repository *submodule,\n-\t\t\t       struct repository *superproject,\n-\t\t\t       const char *path);\n-extern void repo_clear(struct repository *repo);\n+void repo_set_gitdir(struct repository *repo, const char *root,\n+\t\t     const struct set_gitdir_args *extra_args);\n+void repo_set_worktree(struct repository *repo, const char *path);\n+void repo_set_hash_algo(struct repository *repo, int algo);\n+void initialize_the_repository(void);\n+int repo_init(struct repository *r, const char *gitdir, const char *worktree);\n+int repo_submodule_init(struct repository *submodule,\n+\t\t\tstruct repository *superproject,\n+\t\t\tconst char *path);\n+void repo_clear(struct repository *repo);\n \n /*\n  * Populates the repository's index from its index_file, an index struct will\n@@ -116,6 +113,6 @@ extern void repo_clear(struct repository *repo);\n  * than zero if an error occured.  If the repository's index has already been\n  * populated then the number of entries will simply be returned.\n  */\n-extern int repo_read_index(struct repository *repo);\n+int repo_read_index(struct repository *repo);\n \n #endif /* REPOSITORY_H */\n-- \n2.18.0.rc2.476.g39500d3211\n\n"},{"id":"351446","messageId":"20180630092031.29910-9-pclouds@gmail.com","threadId":"48806","inReplyTo":"20180630092031.29910-1-pclouds@gmail.com","subject":"[PATCH 08/12] line-range.h: drop extern from function declaration","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2018-06-30T09:20:27Z","receivedAt":"2018-06-30T09:21:09Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n line-range.h | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/line-range.h b/line-range.h\nindex 83ba3c25e8..d3c54e45aa 100644\n--- a/line-range.h\n+++ b/line-range.h\n@@ -19,11 +19,11 @@\n \n typedef const char *(*nth_line_fn_t)(void *data, long lno);\n \n-extern int parse_range_arg(const char *arg,\n-\t\t\t   nth_line_fn_t nth_line_cb,\n-\t\t\t   void *cb_data, long lines, long anchor,\n-\t\t\t   long *begin, long *end,\n-\t\t\t   const char *path);\n+int parse_range_arg(const char *arg,\n+\t\t    nth_line_fn_t nth_line_cb,\n+\t\t    void *cb_data, long lines, long anchor,\n+\t\t    long *begin, long *end,\n+\t\t    const char *path);\n \n /*\n  * Scan past a range argument that could be parsed by\n@@ -34,6 +34,6 @@ extern int parse_range_arg(const char *arg,\n  * NULL in case the argument is obviously malformed.\n  */\n \n-extern const char *skip_range_arg(const char *arg);\n+const char *skip_range_arg(const char *arg);\n \n #endif /* LINE_RANGE_H */\n-- \n2.18.0.rc2.476.g39500d3211\n\n"},{"id":"351447","messageId":"20180630092031.29910-10-pclouds@gmail.com","threadId":"48806","inReplyTo":"20180630092031.29910-1-pclouds@gmail.com","subject":"[PATCH 09/12] rerere.h: drop extern from function declaration","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2018-06-30T09:20:28Z","receivedAt":"2018-06-30T09:21:11Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n rerere.h | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/rerere.h b/rerere.h\nindex c2961feaaa..cd948f28f4 100644\n--- a/rerere.h\n+++ b/rerere.h\n@@ -22,19 +22,19 @@ struct rerere_id {\n \tint variant;\n };\n \n-extern int setup_rerere(struct string_list *, int);\n-extern int rerere(int);\n+int setup_rerere(struct string_list *, int);\n+int rerere(int);\n /*\n  * Given the conflict ID and the name of a \"file\" used for replaying\n  * the recorded resolution (e.g. \"preimage\", \"postimage\"), return the\n  * path to that filesystem entity.  With \"file\" specified with NULL,\n  * return the path to the directory that houses these files.\n  */\n-extern const char *rerere_path(const struct rerere_id *, const char *file);\n-extern int rerere_forget(struct pathspec *);\n-extern int rerere_remaining(struct string_list *);\n-extern void rerere_clear(struct string_list *);\n-extern void rerere_gc(struct string_list *);\n+const char *rerere_path(const struct rerere_id *, const char *file);\n+int rerere_forget(struct pathspec *);\n+int rerere_remaining(struct string_list *);\n+void rerere_clear(struct string_list *);\n+void rerere_gc(struct string_list *);\n \n #define OPT_RERERE_AUTOUPDATE(v) OPT_UYN(0, \"rerere-autoupdate\", (v), \\\n \tN_(\"update the index with reused conflict resolution if possible\"))\n-- \n2.18.0.rc2.476.g39500d3211\n\n"},{"id":"351448","messageId":"20180630092031.29910-12-pclouds@gmail.com","threadId":"48806","inReplyTo":"20180630092031.29910-1-pclouds@gmail.com","subject":"[PATCH 11/12] revision.h: drop extern from function declaration","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2018-06-30T09:20:30Z","receivedAt":"2018-06-30T09:21:15Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n revision.h | 69 +++++++++++++++++++++++++++---------------------------\n 1 file changed, 35 insertions(+), 34 deletions(-)\n\ndiff --git a/revision.h b/revision.h\nindex b8c47b98e2..5f082a6d98 100644\n--- a/revision.h\n+++ b/revision.h\n@@ -226,7 +226,7 @@ struct rev_info {\n \tconst char *break_bar;\n };\n \n-extern int ref_excluded(struct string_list *, const char *path);\n+int ref_excluded(struct string_list *, const char *path);\n void clear_ref_exclusion(struct string_list **);\n void add_ref_exclusion(struct string_list **, const char *exclude);\n \n@@ -248,39 +248,39 @@ struct setup_revision_opt {\n \tunsigned revarg_opt;\n };\n \n-extern void init_revisions(struct rev_info *revs, const char *prefix);\n-extern int setup_revisions(int argc, const char **argv, struct rev_info *revs,\n-\t\t\t   struct setup_revision_opt *);\n-extern void parse_revision_opt(struct rev_info *revs, struct parse_opt_ctx_t *ctx,\n-\t\t\t       const struct option *options,\n-\t\t\t       const char * const usagestr[]);\n+void init_revisions(struct rev_info *revs, const char *prefix);\n+int setup_revisions(int argc, const char **argv, struct rev_info *revs,\n+\t\t    struct setup_revision_opt *);\n+void parse_revision_opt(struct rev_info *revs, struct parse_opt_ctx_t *ctx,\n+\t\t\tconst struct option *options,\n+\t\t\tconst char * const usagestr[]);\n #define REVARG_CANNOT_BE_FILENAME 01\n #define REVARG_COMMITTISH 02\n-extern int handle_revision_arg(const char *arg, struct rev_info *revs,\n-\t\t\t       int flags, unsigned revarg_opt);\n+int handle_revision_arg(const char *arg, struct rev_info *revs,\n+\t\t\tint flags, unsigned revarg_opt);\n \n-extern void reset_revision_walk(void);\n-extern int prepare_revision_walk(struct rev_info *revs);\n-extern struct commit *get_revision(struct rev_info *revs);\n-extern char *get_revision_mark(const struct rev_info *revs,\n-\t\t\t       const struct commit *commit);\n-extern void put_revision_mark(const struct rev_info *revs,\n-\t\t\t      const struct commit *commit);\n+void reset_revision_walk(void);\n+int prepare_revision_walk(struct rev_info *revs);\n+struct commit *get_revision(struct rev_info *revs);\n+char *get_revision_mark(const struct rev_info *revs,\n+\t\t\tconst struct commit *commit);\n+void put_revision_mark(const struct rev_info *revs,\n+\t\t       const struct commit *commit);\n \n-extern void mark_parents_uninteresting(struct commit *commit);\n-extern void mark_tree_uninteresting(struct tree *tree);\n+void mark_parents_uninteresting(struct commit *commit);\n+void mark_tree_uninteresting(struct tree *tree);\n \n-extern void show_object_with_name(FILE *, struct object *, const char *);\n+void show_object_with_name(FILE *, struct object *, const char *);\n \n-extern void add_pending_object(struct rev_info *revs,\n-\t\t\t       struct object *obj, const char *name);\n-extern void add_pending_oid(struct rev_info *revs,\n-\t\t\t    const char *name, const struct object_id *oid,\n-\t\t\t    unsigned int flags);\n+void add_pending_object(struct rev_info *revs,\n+\t\t\tstruct object *obj, const char *name);\n+void add_pending_oid(struct rev_info *revs,\n+\t\t     const char *name, const struct object_id *oid,\n+\t\t     unsigned int flags);\n \n-extern void add_head_to_pending(struct rev_info *);\n-extern void add_reflogs_to_pending(struct rev_info *, unsigned int flags);\n-extern void add_index_objects_to_pending(struct rev_info *, unsigned int flags);\n+void add_head_to_pending(struct rev_info *);\n+void add_reflogs_to_pending(struct rev_info *, unsigned int flags);\n+void add_index_objects_to_pending(struct rev_info *, unsigned int flags);\n \n enum commit_action {\n \tcommit_ignore,\n@@ -288,10 +288,10 @@ enum commit_action {\n \tcommit_error\n };\n \n-extern enum commit_action get_commit_action(struct rev_info *revs,\n-\t\t\t\t\t    struct commit *commit);\n-extern enum commit_action simplify_commit(struct rev_info *revs,\n-\t\t\t\t\t  struct commit *commit);\n+enum commit_action get_commit_action(struct rev_info *revs,\n+\t\t\t\t     struct commit *commit);\n+enum commit_action simplify_commit(struct rev_info *revs,\n+\t\t\t\t   struct commit *commit);\n \n enum rewrite_result {\n \trewrite_one_ok,\n@@ -301,8 +301,9 @@ enum rewrite_result {\n \n typedef enum rewrite_result (*rewrite_parent_fn_t)(struct rev_info *revs, struct commit **pp);\n \n-extern int rewrite_parents(struct rev_info *revs, struct commit *commit,\n-\trewrite_parent_fn_t rewrite_parent);\n+int rewrite_parents(struct rev_info *revs,\n+\t\t    struct commit *commit,\n+\t\t    rewrite_parent_fn_t rewrite_parent);\n \n /*\n  * The log machinery saves the original parent list so that\n@@ -313,6 +314,6 @@ extern int rewrite_parents(struct rev_info *revs, struct commit *commit,\n  * get_saved_parents() will transparently return commit->parents if\n  * history simplification is off.\n  */\n-extern struct commit_list *get_saved_parents(struct rev_info *revs, const struct commit *commit);\n+struct commit_list *get_saved_parents(struct rev_info *revs, const struct commit *commit);\n \n #endif\n-- \n2.18.0.rc2.476.g39500d3211\n\n"},{"id":"351449","messageId":"20180630092031.29910-13-pclouds@gmail.com","threadId":"48806","inReplyTo":"20180630092031.29910-1-pclouds@gmail.com","subject":"[PATCH 12/12] submodule.h: drop extern from function declaration","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2018-06-30T09:20:31Z","receivedAt":"2018-06-30T09:21:21Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n submodule.h | 112 ++++++++++++++++++++++++++--------------------------\n 1 file changed, 56 insertions(+), 56 deletions(-)\n\ndiff --git a/submodule.h b/submodule.h\nindex 7856b8a0b3..d266e6dca5 100644\n--- a/submodule.h\n+++ b/submodule.h\n@@ -33,62 +33,62 @@ struct submodule_update_strategy {\n };\n #define SUBMODULE_UPDATE_STRATEGY_INIT {SM_UPDATE_UNSPECIFIED, NULL}\n \n-extern int is_gitmodules_unmerged(const struct index_state *istate);\n-extern int is_staging_gitmodules_ok(struct index_state *istate);\n-extern int update_path_in_gitmodules(const char *oldpath, const char *newpath);\n-extern int remove_path_from_gitmodules(const char *path);\n-extern void stage_updated_gitmodules(struct index_state *istate);\n-extern void set_diffopt_flags_from_submodule_config(struct diff_options *,\n-\t\tconst char *path);\n-extern int git_default_submodule_config(const char *var, const char *value, void *cb);\n+int is_gitmodules_unmerged(const struct index_state *istate);\n+int is_staging_gitmodules_ok(struct index_state *istate);\n+int update_path_in_gitmodules(const char *oldpath, const char *newpath);\n+int remove_path_from_gitmodules(const char *path);\n+void stage_updated_gitmodules(struct index_state *istate);\n+void set_diffopt_flags_from_submodule_config(struct diff_options *,\n+\t\t\t\t\t     const char *path);\n+int git_default_submodule_config(const char *var, const char *value, void *cb);\n \n struct option;\n int option_parse_recurse_submodules_worktree_updater(const struct option *opt,\n \t\t\t\t\t\t     const char *arg, int unset);\n-extern int is_submodule_active(struct repository *repo, const char *path);\n+int is_submodule_active(struct repository *repo, const char *path);\n /*\n  * Determine if a submodule has been populated at a given 'path' by checking if\n  * the <path>/.git resolves to a valid git repository.\n  * If return_error_code is NULL, die on error.\n  * Otherwise the return error code is the same as of resolve_gitdir_gently.\n  */\n-extern int is_submodule_populated_gently(const char *path, int *return_error_code);\n-extern void die_in_unpopulated_submodule(const struct index_state *istate,\n-\t\t\t\t\t const char *prefix);\n-extern void die_path_inside_submodule(const struct index_state *istate,\n-\t\t\t\t      const struct pathspec *ps);\n-extern enum submodule_update_type parse_submodule_update_type(const char *value);\n-extern int parse_submodule_update_strategy(const char *value,\n-\t\tstruct submodule_update_strategy *dst);\n-extern const char *submodule_strategy_to_string(const struct submodule_update_strategy *s);\n-extern void handle_ignore_submodules_arg(struct diff_options *, const char *);\n-extern void show_submodule_summary(struct diff_options *o, const char *path,\n-\t\tstruct object_id *one, struct object_id *two,\n-\t\tunsigned dirty_submodule);\n-extern void show_submodule_inline_diff(struct diff_options *o, const char *path,\n-\t\tstruct object_id *one, struct object_id *two,\n-\t\tunsigned dirty_submodule);\n+int is_submodule_populated_gently(const char *path, int *return_error_code);\n+void die_in_unpopulated_submodule(const struct index_state *istate,\n+\t\t\t\t  const char *prefix);\n+void die_path_inside_submodule(const struct index_state *istate,\n+\t\t\t       const struct pathspec *ps);\n+enum submodule_update_type parse_submodule_update_type(const char *value);\n+int parse_submodule_update_strategy(const char *value,\n+\t\t\t\t    struct submodule_update_strategy *dst);\n+const char *submodule_strategy_to_string(const struct submodule_update_strategy *s);\n+void handle_ignore_submodules_arg(struct diff_options *, const char *);\n+void show_submodule_summary(struct diff_options *o, const char *path,\n+\t\t\t    struct object_id *one, struct object_id *two,\n+\t\t\t    unsigned dirty_submodule);\n+void show_submodule_inline_diff(struct diff_options *o, const char *path,\n+\t\t\t\tstruct object_id *one, struct object_id *two,\n+\t\t\t\tunsigned dirty_submodule);\n /* Check if we want to update any submodule.*/\n-extern int should_update_submodules(void);\n+int should_update_submodules(void);\n /*\n  * Returns the submodule struct if the given ce entry is a submodule\n  * and it should be updated. Returns NULL otherwise.\n  */\n-extern const struct submodule *submodule_from_ce(const struct cache_entry *ce);\n-extern void check_for_new_submodule_commits(struct object_id *oid);\n-extern int fetch_populated_submodules(struct repository *r,\n-\t\t\t\t      const struct argv_array *options,\n-\t\t\t\t      const char *prefix,\n-\t\t\t\t      int command_line_option,\n-\t\t\t\t      int default_option,\n-\t\t\t\t      int quiet, int max_parallel_jobs);\n-extern unsigned is_submodule_modified(const char *path, int ignore_untracked);\n-extern int submodule_uses_gitfile(const char *path);\n+const struct submodule *submodule_from_ce(const struct cache_entry *ce);\n+void check_for_new_submodule_commits(struct object_id *oid);\n+int fetch_populated_submodules(struct repository *r,\n+\t\t\t       const struct argv_array *options,\n+\t\t\t       const char *prefix,\n+\t\t\t       int command_line_option,\n+\t\t\t       int default_option,\n+\t\t\t       int quiet, int max_parallel_jobs);\n+unsigned is_submodule_modified(const char *path, int ignore_untracked);\n+int submodule_uses_gitfile(const char *path);\n \n #define SUBMODULE_REMOVAL_DIE_ON_ERROR (1<<0)\n #define SUBMODULE_REMOVAL_IGNORE_UNTRACKED (1<<1)\n #define SUBMODULE_REMOVAL_IGNORE_IGNORED_UNTRACKED (1<<2)\n-extern int bad_to_remove_submodule(const char *path, unsigned flags);\n+int bad_to_remove_submodule(const char *path, unsigned flags);\n \n int add_submodule_odb(const char *path);\n \n@@ -96,17 +96,17 @@ int add_submodule_odb(const char *path);\n  * Checks if there are submodule changes in a..b. If a is the null OID,\n  * checks b and all its ancestors instead.\n  */\n-extern int submodule_touches_in_range(struct object_id *a,\n-\t\t\t\t      struct object_id *b);\n-extern int find_unpushed_submodules(struct oid_array *commits,\n-\t\t\t\t    const char *remotes_name,\n-\t\t\t\t    struct string_list *needs_pushing);\n+int submodule_touches_in_range(struct object_id *a,\n+\t\t\t       struct object_id *b);\n+int find_unpushed_submodules(struct oid_array *commits,\n+\t\t\t     const char *remotes_name,\n+\t\t\t     struct string_list *needs_pushing);\n struct refspec;\n-extern int push_unpushed_submodules(struct oid_array *commits,\n-\t\t\t\t    const struct remote *remote,\n-\t\t\t\t    const struct refspec *rs,\n-\t\t\t\t    const struct string_list *push_options,\n-\t\t\t\t    int dry_run);\n+int push_unpushed_submodules(struct oid_array *commits,\n+\t\t\t     const struct remote *remote,\n+\t\t\t     const struct refspec *rs,\n+\t\t\t     const struct string_list *push_options,\n+\t\t\t     int dry_run);\n /*\n  * Given a submodule path (as in the index), return the repository\n  * path of that submodule in 'buf'. Return -1 on error or when the\n@@ -116,28 +116,28 @@ int submodule_to_gitdir(struct strbuf *buf, const char *submodule);\n \n #define SUBMODULE_MOVE_HEAD_DRY_RUN (1<<0)\n #define SUBMODULE_MOVE_HEAD_FORCE   (1<<1)\n-extern int submodule_move_head(const char *path,\n-\t\t\t       const char *old,\n-\t\t\t       const char *new_head,\n-\t\t\t       unsigned flags);\n+int submodule_move_head(const char *path,\n+\t\t\tconst char *old,\n+\t\t\tconst char *new_head,\n+\t\t\tunsigned flags);\n \n /*\n  * Prepare the \"env_array\" parameter of a \"struct child_process\" for executing\n  * a submodule by clearing any repo-specific environment variables, but\n  * retaining any config in the environment.\n  */\n-extern void prepare_submodule_repo_env(struct argv_array *out);\n+void prepare_submodule_repo_env(struct argv_array *out);\n \n #define ABSORB_GITDIR_RECURSE_SUBMODULES (1<<0)\n-extern void absorb_git_dir_into_superproject(const char *prefix,\n-\t\t\t\t\t     const char *path,\n-\t\t\t\t\t     unsigned flags);\n+void absorb_git_dir_into_superproject(const char *prefix,\n+\t\t\t\t      const char *path,\n+\t\t\t\t      unsigned flags);\n \n /*\n  * Return the absolute path of the working tree of the superproject, which this\n  * project is a submodule of. If this repository is not a submodule of\n  * another repository, return NULL.\n  */\n-extern const char *get_superproject_working_tree(void);\n+const char *get_superproject_working_tree(void);\n \n #endif\n-- \n2.18.0.rc2.476.g39500d3211\n\n"},{"id":"351530","messageId":"20180702160936.GA246956@google.com","threadId":"48806","inReplyTo":"20180630092031.29910-1-pclouds@gmail.com","subject":"Re: [PATCH 00/12] Kill the_index part2, header file cleanup","fromName":"Brandon Williams","fromEmail":"bmwill@google.com","sentAt":"2018-07-02T16:09:36Z","receivedAt":"2018-07-02T16:09:43Z","isPatch":true,"sender":{"key":"bwilliams.eng@gmail.com","avatar":null},"body":"On 06/30, Nguyễn Thái Ngọc Duy wrote:\n> Like part 1 this is also boring. I wanted to drop these 'extern'\n> everywhere actually, so before I touched any header file in this\n> series, I did a clean up first. This is the result (and to reduce diff\n> noise later)\n\nI've scanned through the series and it looks good.  Again, thanks for\nputting in the work to get this done.  I'm looking forward to the end\nproduct :)\n\n-- \nBrandon Williams\n"},{"id":"353247","messageId":"CACsJy8Am4bWKziBV6-J+c+Kz4u-rkotgZiorhvHOfy2K5cMBvg@mail.gmail.com","threadId":"48806","inReplyTo":"20180630092031.29910-1-pclouds@gmail.com","subject":"Re: [PATCH 00/12] Kill the_index part2, header file cleanup","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2018-07-21T09:06:45Z","receivedAt":"2018-07-21T09:07:15Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sat, Jun 30, 2018 at 11:20 AM Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:\n>\n> Like part 1 this is also boring. I wanted to drop these 'extern'\n> everywhere actually, so before I touched any header file in this\n> series, I did a clean up first. This is the result (and to reduce diff\n> noise later)\n\nJunio, part1 of the \"kill the_index\" series is dropped, but what about\nthis one? I think it's still a good cleanup and it only slightly\nconflicts with 'pu'.\n\n>\n> Nguyễn Thái Ngọc Duy (12):\n>   apply.h: drop extern on func declaration\n>   attr.h: drop extern from function declaration\n>   blame.h: drop extern on func declaration\n>   cache-tree.h: drop extern from function declaration\n>   convert.h: drop 'extern' from function declaration\n>   diffcore.h: drop extern from function declaration\n>   diff.h: remove extern from function declaration\n>   line-range.h: drop extern from function declaration\n>   rerere.h: drop extern from function declaration\n>   repository.h: drop extern from function declaration\n>   revision.h: drop extern from function declaration\n>   submodule.h: drop extern from function declaration\n>\n>  apply.h      |  23 +++++-----\n>  attr.h       |  24 +++++------\n>  blame.h      |  28 ++++++------\n>  cache-tree.h |   2 +-\n>  convert.h    |  56 ++++++++++++------------\n>  diff.h       | 120 +++++++++++++++++++++++++--------------------------\n>  diffcore.h   |  50 ++++++++++-----------\n>  line-range.h |  12 +++---\n>  repository.h |  25 +++++------\n>  rerere.h     |  14 +++---\n>  revision.h   |  69 ++++++++++++++---------------\n>  submodule.h  | 112 +++++++++++++++++++++++------------------------\n>  12 files changed, 269 insertions(+), 266 deletions(-)\n>\n> --\n> 2.18.0.rc2.476.g39500d3211\n>\n\n\n-- \nDuy\n"},{"id":"354403","messageId":"CACsJy8DnsTw6_Ohu+rZyqiBGV127dJ1Y4xGRbkRTaBchHtaQxQ@mail.gmail.com","threadId":"48806","inReplyTo":"CACsJy8Am4bWKziBV6-J+c+Kz4u-rkotgZiorhvHOfy2K5cMBvg@mail.gmail.com","subject":"Re: [PATCH 00/12] Kill the_index part2, header file cleanup","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2018-08-03T16:16:36Z","receivedAt":"2018-08-03T16:17:05Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Another friendly ping. I really need to know if I need to update (or\ndrop) this part before moving on to part 3.\n\nOn Sat, Jul 21, 2018 at 11:06 AM Duy Nguyen <pclouds@gmail.com> wrote:\n>\n> On Sat, Jun 30, 2018 at 11:20 AM Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:\n> >\n> > Like part 1 this is also boring. I wanted to drop these 'extern'\n> > everywhere actually, so before I touched any header file in this\n> > series, I did a clean up first. This is the result (and to reduce diff\n> > noise later)\n>\n> Junio, part1 of the \"kill the_index\" series is dropped, but what about\n> this one? I think it's still a good cleanup and it only slightly\n> conflicts with 'pu'.\n>\n> >\n> > Nguyễn Thái Ngọc Duy (12):\n> >   apply.h: drop extern on func declaration\n> >   attr.h: drop extern from function declaration\n> >   blame.h: drop extern on func declaration\n> >   cache-tree.h: drop extern from function declaration\n> >   convert.h: drop 'extern' from function declaration\n> >   diffcore.h: drop extern from function declaration\n> >   diff.h: remove extern from function declaration\n> >   line-range.h: drop extern from function declaration\n> >   rerere.h: drop extern from function declaration\n> >   repository.h: drop extern from function declaration\n> >   revision.h: drop extern from function declaration\n> >   submodule.h: drop extern from function declaration\n> >\n> >  apply.h      |  23 +++++-----\n> >  attr.h       |  24 +++++------\n> >  blame.h      |  28 ++++++------\n> >  cache-tree.h |   2 +-\n> >  convert.h    |  56 ++++++++++++------------\n> >  diff.h       | 120 +++++++++++++++++++++++++--------------------------\n> >  diffcore.h   |  50 ++++++++++-----------\n> >  line-range.h |  12 +++---\n> >  repository.h |  25 +++++------\n> >  rerere.h     |  14 +++---\n> >  revision.h   |  69 ++++++++++++++---------------\n> >  submodule.h  | 112 +++++++++++++++++++++++------------------------\n> >  12 files changed, 269 insertions(+), 266 deletions(-)\n> >\n> > --\n> > 2.18.0.rc2.476.g39500d3211\n> >\n>\n>\n> --\n> Duy\n\n\n\n-- \nDuy\n"},{"id":"354411","messageId":"xmqqtvobxtim.fsf@gitster-ct.c.googlers.com","threadId":"48806","inReplyTo":"CACsJy8DnsTw6_Ohu+rZyqiBGV127dJ1Y4xGRbkRTaBchHtaQxQ@mail.gmail.com","subject":"Re: [PATCH 00/12] Kill the_index part2, header file cleanup","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-08-03T17:13:53Z","receivedAt":"2018-08-03T17:13:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Duy Nguyen <pclouds@gmail.com> writes:\n\n> Another friendly ping. I really need to know if I need to update (or\n> drop) this part before moving on to part 3.\n\nEasier is to resend and see if it sticks this time (that is how I\nlanded format-patch back when I was just an individual contributor\n;-)\n\nI will see if I can locate them in the archive (I actually do not\nhave strong preference either way myself, so the inaction was not a\nform of objection but was merely showing a \"Meh\").\n\nThanks for prodding.\n"}]}