summaryrefslogtreecommitdiff
path: root/run-command.h
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-04-29 08:28:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-05-05 06:20:08 (GMT)
commitb199d7147a218c3b10b077f9caad0f207bc34d7a (patch)
tree56c58e8053c5f5c8d177d84f1f29ca7449c17d42 /run-command.h
parent554544276a604c144df45efcb060c80aa322088c (diff)
downloadgit-b199d7147a218c3b10b077f9caad0f207bc34d7a.zip
git-b199d7147a218c3b10b077f9caad0f207bc34d7a.tar.gz
git-b199d7147a218c3b10b077f9caad0f207bc34d7a.tar.bz2
*.[ch]: remove extern from function declarations using sed
There has been a push to remove extern from function declarations. Finish the job by removing all instances of "extern" for function declarations in headers using sed. This was done by running the following on my system with sed 4.2.2: $ git ls-files \*.{c,h} | grep -v ^compat/ | xargs sed -i'' -e 's/^\(\s*\)extern \([^(]*([^*]\)/\1\2/' Files under `compat/` are intentionally excluded as some are directly copied from external sources and we should avoid churning them as much as possible. Then, leftover instances of extern were found by running $ git grep -w -C3 extern \*.{c,h} and manually checking the output. No other instances were found. Note that the regex used specifically excludes function variables which _should_ be left as extern. Not the most elegant way to do it but it gets the job done. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'run-command.h')
-rw-r--r--run-command.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/run-command.h b/run-command.h
index 31f6f2e..f769e03 100644
--- a/run-command.h
+++ b/run-command.h
@@ -69,7 +69,7 @@ int run_command(struct child_process *);
*/
const char *find_hook(const char *name);
LAST_ARG_MUST_BE_NULL
-extern int run_hook_le(const char *const *env, const char *name, ...);
+int run_hook_le(const char *const *env, const char *name, ...);
int run_hook_ve(const char *const *env, const char *name, va_list args);
#define RUN_COMMAND_NO_STDIN 1