]> git.ipfire.org Git - thirdparty/git.git/commitdiff
style: the opening '{' of a function is in a separate line
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 9 Dec 2018 10:25:21 +0000 (11:25 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Dec 2018 06:41:09 +0000 (15:41 +0900)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 files changed:
bisect.c
builtin/config.c
builtin/push.c
convert.c
credential-cache--daemon.c
diff.c
git.c
imap-send.c
remote-curl.c
sequencer.c
string-list.c
t/helper/test-sigchain.c
transport-helper.c
url.c
userdiff.c

index 487675c67249a3164294aae71c1c2a650f3c4947..bd140cde36d499d604b87bf005dbad985f79f12e 100644 (file)
--- a/bisect.c
+++ b/bisect.c
@@ -558,7 +558,8 @@ struct commit_list *filter_skipped(struct commit_list *list,
  * is increased by one between each call, but that should not matter
  * for this application.
  */
-static unsigned get_prn(unsigned count) {
+static unsigned get_prn(unsigned count)
+{
        count = count * 1103515245 + 12345;
        return (count/65536) % PRN_MODULO;
 }
index 84385ef165195e7c65be54e9463cb49578bec2bb..99bc7ef64ec6f7f0ab0e6dc1d0dc3fd149969a16 100644 (file)
@@ -164,7 +164,8 @@ static NORETURN void usage_builtin_config(void)
        usage_with_options(builtin_config_usage, builtin_config_options);
 }
 
-static void check_argc(int argc, int min, int max) {
+static void check_argc(int argc, int min, int max)
+{
        if (argc >= min && argc <= max)
                return;
        if (min == max)
index 8bb8a0849ba90aff5d295acc3894b2034cbbdef2..759812d1d5de5d22a2f26bef776c13b88af2d325 100644 (file)
@@ -143,7 +143,9 @@ static int push_url_of_remote(struct remote *remote, const char ***url_p)
        return remote->url_nr;
 }
 
-static NORETURN int die_push_simple(struct branch *branch, struct remote *remote) {
+static NORETURN int die_push_simple(struct branch *branch,
+                                   struct remote *remote)
+{
        /*
         * There's no point in using shorten_unambiguous_ref here,
         * as the ambiguity would be on the remote side, not what
index e0848226d21bbbeb26d9ac6217fe1e61ccc71fca..bc40f01eb47a9ca13a596cadb12ce288e922f8fd 100644 (file)
--- a/convert.c
+++ b/convert.c
@@ -778,7 +778,8 @@ static int start_multi_file_filter_fn(struct subprocess_entry *subprocess)
 
 static void handle_filter_error(const struct strbuf *filter_status,
                                struct cmd2process *entry,
-                               const unsigned int wanted_capability) {
+                               const unsigned int wanted_capability)
+{
        if (!strcmp(filter_status->buf, "error"))
                ; /* The filter signaled a problem with the file. */
        else if (!strcmp(filter_status->buf, "abort") && wanted_capability) {
index 4dfbc8c9f917a600c0995b7e33927df3fa19453d..ec1271f89ce08b3b117fe09715f61730c7943bea 100644 (file)
@@ -91,7 +91,8 @@ static timestamp_t check_expirations(void)
 }
 
 static int read_request(FILE *fh, struct credential *c,
-                       struct strbuf *action, int *timeout) {
+                       struct strbuf *action, int *timeout)
+{
        static struct strbuf item = STRBUF_INIT;
        const char *p;
 
diff --git a/diff.c b/diff.c
index dc9965e836cd49c46a01293ef1d678a619b8f997..b5f573cf7ae5909b119d7affb049c366308a6d5e 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -1637,7 +1637,8 @@ static void emit_hunk_header(struct emit_callback *ecbdata,
        strbuf_release(&msgbuf);
 }
 
-static struct diff_tempfile *claim_diff_tempfile(void) {
+static struct diff_tempfile *claim_diff_tempfile(void)
+{
        int i;
        for (i = 0; i < ARRAY_SIZE(diff_temp); i++)
                if (!diff_temp[i].name)
@@ -4819,7 +4820,8 @@ static int parse_diff_filter_opt(const char *optarg, struct diff_options *opt)
        return 0;
 }
 
-static void enable_patch_output(int *fmt) {
+static void enable_patch_output(int *fmt)
+{
        *fmt &= ~DIFF_FORMAT_NO_OUTPUT;
        *fmt |= DIFF_FORMAT_PATCH;
 }
diff --git a/git.c b/git.c
index 2f604a41eaf620f4d185c612cd7c6aee975faa67..d69beaf3b0383ed271a0751e4f9e6eccf3fb5cce 100644 (file)
--- a/git.c
+++ b/git.c
@@ -98,7 +98,8 @@ static int list_cmds(const char *spec)
        return 0;
 }
 
-static void commit_pager_choice(void) {
+static void commit_pager_choice(void)
+{
        switch (use_pager) {
        case 0:
                setenv("GIT_PAGER", "cat", 1);
index b4eb886e2a6a40bce1e478d8d24f43f64ed2e3aa..18ca6ba10a81931e6b789fa2d25d6dc2e1767eec 100644 (file)
@@ -1471,7 +1471,8 @@ static CURL *setup_curl(struct imap_server_conf *srvc, struct credential *cred)
 }
 
 static int curl_append_msgs_to_imap(struct imap_server_conf *server,
-                                   struct strbuf* all_msgs, int total) {
+                                   struct strbuf* all_msgs, int total)
+{
        int ofs = 0;
        int n = 0;
        struct buffer msgbuf = { STRBUF_INIT, 0 };
index 1220dffcdc57a17476fb2021db5fb1605857ab80..90d565c8c5421eee7f929059e8e465ddfbe78dc2 100644 (file)
@@ -617,7 +617,8 @@ static int probe_rpc(struct rpc_state *rpc, struct slot_results *results)
        return err;
 }
 
-static curl_off_t xcurl_off_t(size_t len) {
+static curl_off_t xcurl_off_t(size_t len)
+{
        uintmax_t size = len;
        if (size > maximum_signed_value_of_type(curl_off_t))
                die("cannot handle pushes this big");
index e1a4dd15f1a826c7bd1bf4780c8f85c21117c43b..55b609a7f44c950c967a6b264c8ed45ff8c80a92 100644 (file)
@@ -1670,7 +1670,8 @@ static int update_squash_messages(enum todo_command command,
        return res;
 }
 
-static void flush_rewritten_pending(void) {
+static void flush_rewritten_pending(void)
+{
        struct strbuf buf = STRBUF_INIT;
        struct object_id newoid;
        FILE *out;
@@ -1695,7 +1696,8 @@ static void flush_rewritten_pending(void) {
 }
 
 static void record_in_rewritten(struct object_id *oid,
-               enum todo_command next_command) {
+               enum todo_command next_command)
+{
        FILE *out = fopen_or_warn(rebase_path_rewritten_pending(), "a");
 
        if (!out)
index 1f6063f2a27812ee27b5d510dc066249198b48e3..a917955fbd8d18956ae593b5fa190042e13db644 100644 (file)
@@ -155,7 +155,8 @@ static int item_is_not_empty(struct string_list_item *item, void *unused)
        return *item->string != '\0';
 }
 
-void string_list_remove_empty_items(struct string_list *list, int free_util) {
+void string_list_remove_empty_items(struct string_list *list, int free_util)
+{
        filter_string_list(list, free_util, item_is_not_empty, NULL);
 }
 
index 77ac5bc33f8eb635f78d8ba590c23bbbe4f29636..d013bccddaebd9c7fb0eb4b4c4e1be0643f82260 100644 (file)
@@ -14,7 +14,8 @@ X(two)
 X(three)
 #undef X
 
-int cmd__sigchain(int argc, const char **argv) {
+int cmd__sigchain(int argc, const char **argv)
+{
        sigchain_push(SIGTERM, one);
        sigchain_push(SIGTERM, two);
        sigchain_push(SIGTERM, three);
index bf225c698fac81a9a94eff6d3371988ac4ff0bac..4702e150f0ef8f5f2253d64dad0abf6906867233 100644 (file)
@@ -1026,7 +1026,8 @@ static int push_refs(struct transport *transport,
 }
 
 
-static int has_attribute(const char *attrs, const char *attr) {
+static int has_attribute(const char *attrs, const char *attr)
+{
        int len;
        if (!attrs)
                return 0;
diff --git a/url.c b/url.c
index eaf4f07081eae122fbc38e05f60ee2f11a0c65a6..25576c390baa79cb0a203d7f682e8f3442f91a60 100644 (file)
--- a/url.c
+++ b/url.c
@@ -104,7 +104,8 @@ void end_url_with_slash(struct strbuf *buf, const char *url)
        strbuf_complete(buf, '/');
 }
 
-void str_end_url_with_slash(const char *url, char **dest) {
+void str_end_url_with_slash(const char *url, char **dest)
+{
        struct strbuf buf = STRBUF_INIT;
        end_url_with_slash(&buf, url);
        free(*dest);
index 46d34cc2a436c6084531d39628d013785700e2ba..e0579522bd364998735379c5fcdf979f94e96f5c 100644 (file)
@@ -265,7 +265,8 @@ int userdiff_config(const char *k, const char *v)
        return 0;
 }
 
-struct userdiff_driver *userdiff_find_by_name(const char *name) {
+struct userdiff_driver *userdiff_find_by_name(const char *name)
+{
        int len = strlen(name);
        return userdiff_find_by_namelen(name, len);
 }