From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-5.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 661631FF76 for ; Tue, 20 Dec 2016 23:20:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935447AbcLTXU0 (ORCPT ); Tue, 20 Dec 2016 18:20:26 -0500 Received: from mail-pf0-f177.google.com ([209.85.192.177]:33672 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932791AbcLTXUU (ORCPT ); Tue, 20 Dec 2016 18:20:20 -0500 Received: by mail-pf0-f177.google.com with SMTP id d2so31045586pfd.0 for ; Tue, 20 Dec 2016 15:20:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ngdzyMcpQqt7yOSlTLHMvS5bRY+yxD04FM7r36eQKEo=; b=mS3LtxtIkKWPIT0aScQ1c7WY0I3oiY//hRG8Zb6bFrYJuBYFhOEq5vdH2YRHf3e7EX zWL/br++ghTCaT/MY0VZ/f2OdqFtOjj29svzYlSZAM/cKRZg0IZtsVUEMpFcskFQEcjQ cWaC7LrpCcyCc1njQarfQbn8aNtO1VZB+ByWCbcX/dBLcIo+2nBDukEIFsi7EFktfzKq 27iyu6/NboILZt1BgP3npM5KMA3PUbogLbGFij+fgtjHu6KvpdMkTV8upnf6NQRUmfGr H+JDM9mBqPfC9lXLQkC4vpfi51nYFhjnfYsOssAvE4XEv2Cj0t8Q6L6CJxun2xZgUFh8 +UNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ngdzyMcpQqt7yOSlTLHMvS5bRY+yxD04FM7r36eQKEo=; b=BNgkb3A4K9+xwqXcD3ALZeWf2XhaN2T+1jL+3uCfvX9n3YoqNUDrg1RMee/wE+48Se /gOdMC8f4mJTv7P8brohvw783tcx3Giy4iGZMDbBJdRxTRAbTqzM3A+20+BBz/5qukPe hANpsgoDCPIXHTtQ5qlWBMilaNfR54bUNDNcYGWej8ITkWYWPo8bpfmi+4Fm4rx6RtIZ tItvpRNU+NfI5ftBpWJ8zjFlgVXX7S8CUN3C0kq/1+gg/g1fnViJFA5lfzRzUl38tG7c 77wRH4rH07wSvPUrx+l43Am9dcPscNiHlDBcCbv8DGvkmTvwbwdQlGsGaEJjndizOTBy +oIQ== X-Gm-Message-State: AIkVDXIhKxu5PIUWBc1tAHilugLf29uwUl5FhnBH7w3wGdiq78YOSTowA22EFSj/x0tG2o+9 X-Received: by 10.98.67.89 with SMTP id q86mr1470024pfa.178.1482276019174; Tue, 20 Dec 2016 15:20:19 -0800 (PST) Received: from localhost ([2620:0:1000:5b10:6c5b:c771:3806:a807]) by smtp.gmail.com with ESMTPSA id k192sm22103878pgc.3.2016.12.20.15.20.18 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 20 Dec 2016 15:20:18 -0800 (PST) From: Stefan Beller To: gitster@pobox.com Cc: git@vger.kernel.org, bmwill@google.com, David.Turner@twosigma.com, sandals@crustytoothpaste.net, j6t@kdbg.org, Stefan Beller Subject: [PATCHv5 1/4] submodule.h: add extern keyword to functions Date: Tue, 20 Dec 2016 15:20:09 -0800 Message-Id: <20161220232012.15997-2-sbeller@google.com> X-Mailer: git-send-email 2.11.0.rc2.53.gb7b3fba.dirty In-Reply-To: <20161220232012.15997-1-sbeller@google.com> References: <20161220232012.15997-1-sbeller@google.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org As the upcoming series will add a lot of functions to the submodule header, let's first make the header consistent to the rest of the project by adding the extern keyword to functions. As per the CodingGuidelines we try to stay below 80 characters per line, so adapt all those functions to stay below 80 characters that are already using more than one line. Those function using just one line are better kept in one line than breaking them up into multiple lines just for the goal of staying below the character limit as it makes grepping for functions easier if they are one liners. Signed-off-by: Stefan Beller --- submodule.h | 55 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/submodule.h b/submodule.h index 6229054b99..61fb610749 100644 --- a/submodule.h +++ b/submodule.h @@ -29,50 +29,55 @@ struct submodule_update_strategy { }; #define SUBMODULE_UPDATE_STRATEGY_INIT {SM_UPDATE_UNSPECIFIED, NULL} -int is_staging_gitmodules_ok(void); -int update_path_in_gitmodules(const char *oldpath, const char *newpath); -int remove_path_from_gitmodules(const char *path); -void stage_updated_gitmodules(void); -void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt, +extern int is_staging_gitmodules_ok(void); +extern int update_path_in_gitmodules(const char *oldpath, const char *newpath); +extern int remove_path_from_gitmodules(const char *path); +extern void stage_updated_gitmodules(void); +extern void set_diffopt_flags_from_submodule_config(struct diff_options *, const char *path); -int submodule_config(const char *var, const char *value, void *cb); -void gitmodules_config(void); -int parse_submodule_update_strategy(const char *value, +extern int submodule_config(const char *var, const char *value, void *cb); +extern void gitmodules_config(void); +extern int parse_submodule_update_strategy(const char *value, struct submodule_update_strategy *dst); -const char *submodule_strategy_to_string(const struct submodule_update_strategy *s); -void handle_ignore_submodules_arg(struct diff_options *diffopt, const char *); -void show_submodule_summary(FILE *f, const char *path, +extern const char *submodule_strategy_to_string(const struct submodule_update_strategy *s); +extern void handle_ignore_submodules_arg(struct diff_options *, const char *); +extern void show_submodule_summary(FILE *f, const char *path, const char *line_prefix, struct object_id *one, struct object_id *two, unsigned dirty_submodule, const char *meta, const char *del, const char *add, const char *reset); -void show_submodule_inline_diff(FILE *f, const char *path, +extern void show_submodule_inline_diff(FILE *f, const char *path, const char *line_prefix, struct object_id *one, struct object_id *two, unsigned dirty_submodule, const char *meta, const char *del, const char *add, const char *reset, const struct diff_options *opt); -void set_config_fetch_recurse_submodules(int value); -void check_for_new_submodule_commits(unsigned char new_sha1[20]); -int fetch_populated_submodules(const struct argv_array *options, +extern void set_config_fetch_recurse_submodules(int value); +extern void check_for_new_submodule_commits(unsigned char new_sha1[20]); +extern int fetch_populated_submodules(const struct argv_array *options, const char *prefix, int command_line_option, int quiet, int max_parallel_jobs); -unsigned is_submodule_modified(const char *path, int ignore_untracked); -int submodule_uses_gitfile(const char *path); -int ok_to_remove_submodule(const char *path); -int merge_submodule(unsigned char result[20], const char *path, const unsigned char base[20], - const unsigned char a[20], const unsigned char b[20], int search); -int find_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name, - struct string_list *needs_pushing); -int push_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name); -int parallel_submodules(void); +extern unsigned is_submodule_modified(const char *path, int ignore_untracked); +extern int submodule_uses_gitfile(const char *path); +extern int ok_to_remove_submodule(const char *path); +extern int merge_submodule(unsigned char result[20], const char *path, + const unsigned char base[20], + const unsigned char a[20], + const unsigned char b[20], int search); +extern int find_unpushed_submodules(unsigned char new_sha1[20], + const char *remotes_name, + struct string_list *needs_pushing); +extern int push_unpushed_submodules(unsigned char new_sha1[20], + const char *remotes_name); +extern void connect_work_tree_and_git_dir(const char *work_tree, const char *git_dir); +extern int parallel_submodules(void); /* * Prepare the "env_array" parameter of a "struct child_process" for executing * a submodule by clearing any repo-specific envirionment variables, but * retaining any config in the environment. */ -void prepare_submodule_repo_env(struct argv_array *out); +extern void prepare_submodule_repo_env(struct argv_array *out); #define ABSORB_GITDIR_RECURSE_SUBMODULES (1<<0) extern void absorb_git_dir_into_superproject(const char *prefix, -- 2.11.0.rc2.53.gb7b3fba.dirty