summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-01-18 13:49:52 -0800
committerJunio C Hamano <gitster@pobox.com>2019-01-18 13:49:52 -0800
commit3434569fc206c2f4bc434571d202f2961aa905e5 (patch)
tree87899124d519d771b5b4c15a779ae594ef44d801
parente07074d3f0f0efcb6cef30dc603d75c595942431 (diff)
parent3b3357626edc841a51d8885ddf6986bab5b6f778 (diff)
downloadgit-3434569fc206c2f4bc434571d202f2961aa905e5.tar.gz
git-3434569fc206c2f4bc434571d202f2961aa905e5.tar.xz
Merge branch 'nd/style-opening-brace'
Code clean-up. * nd/style-opening-brace: style: the opening '{' of a function is in a separate line
-rw-r--r--bisect.c3
-rw-r--r--builtin/config.c3
-rw-r--r--builtin/push.c4
-rw-r--r--convert.c3
-rw-r--r--credential-cache--daemon.c3
-rw-r--r--diff.c6
-rw-r--r--git.c3
-rw-r--r--imap-send.c3
-rw-r--r--remote-curl.c3
-rw-r--r--sequencer.c6
-rw-r--r--string-list.c3
-rw-r--r--t/helper/test-sigchain.c3
-rw-r--r--transport-helper.c3
-rw-r--r--url.c3
-rw-r--r--userdiff.c3
15 files changed, 35 insertions, 17 deletions
diff --git a/bisect.c b/bisect.c
index 4c1b80bff..6bf521138 100644
--- 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;
}
diff --git a/builtin/config.c b/builtin/config.c
index 84385ef16..99bc7ef64 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -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)
diff --git a/builtin/push.c b/builtin/push.c
index ee1e84202..021dd3b1e 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -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
diff --git a/convert.c b/convert.c
index 5f60c11ce..0d89ae7c2 100644
--- 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) {
diff --git a/credential-cache--daemon.c b/credential-cache--daemon.c
index 4dfbc8c9f..ec1271f89 100644
--- a/credential-cache--daemon.c
+++ b/credential-cache--daemon.c
@@ -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 f1e901a5f..1b5f27636 100644
--- a/diff.c
+++ b/diff.c
@@ -1641,7 +1641,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)
@@ -4823,7 +4824,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 4d53a3d50..0ce0e13f0 100644
--- 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);
diff --git a/imap-send.c b/imap-send.c
index b4eb886e2..18ca6ba10 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -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 };
diff --git a/remote-curl.c b/remote-curl.c
index 1220dffcd..90d565c8c 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -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");
diff --git a/sequencer.c b/sequencer.c
index b68bca0be..4f1cb5e38 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1689,7 +1689,8 @@ static int update_squash_messages(struct repository *r,
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;
@@ -1714,7 +1715,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)
diff --git a/string-list.c b/string-list.c
index 1f6063f2a..a917955fb 100644
--- a/string-list.c
+++ b/string-list.c
@@ -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);
}
diff --git a/t/helper/test-sigchain.c b/t/helper/test-sigchain.c
index 77ac5bc33..d013bccdd 100644
--- a/t/helper/test-sigchain.c
+++ b/t/helper/test-sigchain.c
@@ -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);
diff --git a/transport-helper.c b/transport-helper.c
index bf225c698..4702e150f 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -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 eaf4f0708..25576c390 100644
--- 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);
diff --git a/userdiff.c b/userdiff.c
index 97007abe5..3a78fbf50 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -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);
}