Skip to content

Commit 3b33576

Browse files
pcloudsgitster
authored andcommitted
style: the opening '{' of a function is in a separate line
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 5d826e9 commit 3b33576

File tree

15 files changed

+35
-17
lines changed

15 files changed

+35
-17
lines changed

bisect.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,8 @@ struct commit_list *filter_skipped(struct commit_list *list,
558558
* is increased by one between each call, but that should not matter
559559
* for this application.
560560
*/
561-
static unsigned get_prn(unsigned count) {
561+
static unsigned get_prn(unsigned count)
562+
{
562563
count = count * 1103515245 + 12345;
563564
return (count/65536) % PRN_MODULO;
564565
}

builtin/config.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ static NORETURN void usage_builtin_config(void)
164164
usage_with_options(builtin_config_usage, builtin_config_options);
165165
}
166166

167-
static void check_argc(int argc, int min, int max) {
167+
static void check_argc(int argc, int min, int max)
168+
{
168169
if (argc >= min && argc <= max)
169170
return;
170171
if (min == max)

builtin/push.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ static int push_url_of_remote(struct remote *remote, const char ***url_p)
143143
return remote->url_nr;
144144
}
145145

146-
static NORETURN int die_push_simple(struct branch *branch, struct remote *remote) {
146+
static NORETURN int die_push_simple(struct branch *branch,
147+
struct remote *remote)
148+
{
147149
/*
148150
* There's no point in using shorten_unambiguous_ref here,
149151
* as the ambiguity would be on the remote side, not what

convert.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,8 @@ static int start_multi_file_filter_fn(struct subprocess_entry *subprocess)
778778

779779
static void handle_filter_error(const struct strbuf *filter_status,
780780
struct cmd2process *entry,
781-
const unsigned int wanted_capability) {
781+
const unsigned int wanted_capability)
782+
{
782783
if (!strcmp(filter_status->buf, "error"))
783784
; /* The filter signaled a problem with the file. */
784785
else if (!strcmp(filter_status->buf, "abort") && wanted_capability) {

credential-cache--daemon.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ static timestamp_t check_expirations(void)
9191
}
9292

9393
static int read_request(FILE *fh, struct credential *c,
94-
struct strbuf *action, int *timeout) {
94+
struct strbuf *action, int *timeout)
95+
{
9596
static struct strbuf item = STRBUF_INIT;
9697
const char *p;
9798

diff.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,7 +1637,8 @@ static void emit_hunk_header(struct emit_callback *ecbdata,
16371637
strbuf_release(&msgbuf);
16381638
}
16391639

1640-
static struct diff_tempfile *claim_diff_tempfile(void) {
1640+
static struct diff_tempfile *claim_diff_tempfile(void)
1641+
{
16411642
int i;
16421643
for (i = 0; i < ARRAY_SIZE(diff_temp); i++)
16431644
if (!diff_temp[i].name)
@@ -4819,7 +4820,8 @@ static int parse_diff_filter_opt(const char *optarg, struct diff_options *opt)
48194820
return 0;
48204821
}
48214822

4822-
static void enable_patch_output(int *fmt) {
4823+
static void enable_patch_output(int *fmt)
4824+
{
48234825
*fmt &= ~DIFF_FORMAT_NO_OUTPUT;
48244826
*fmt |= DIFF_FORMAT_PATCH;
48254827
}

git.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ static int list_cmds(const char *spec)
9898
return 0;
9999
}
100100

101-
static void commit_pager_choice(void) {
101+
static void commit_pager_choice(void)
102+
{
102103
switch (use_pager) {
103104
case 0:
104105
setenv("GIT_PAGER", "cat", 1);

imap-send.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,8 @@ static CURL *setup_curl(struct imap_server_conf *srvc, struct credential *cred)
14711471
}
14721472

14731473
static int curl_append_msgs_to_imap(struct imap_server_conf *server,
1474-
struct strbuf* all_msgs, int total) {
1474+
struct strbuf* all_msgs, int total)
1475+
{
14751476
int ofs = 0;
14761477
int n = 0;
14771478
struct buffer msgbuf = { STRBUF_INIT, 0 };

remote-curl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,8 @@ static int probe_rpc(struct rpc_state *rpc, struct slot_results *results)
617617
return err;
618618
}
619619

620-
static curl_off_t xcurl_off_t(size_t len) {
620+
static curl_off_t xcurl_off_t(size_t len)
621+
{
621622
uintmax_t size = len;
622623
if (size > maximum_signed_value_of_type(curl_off_t))
623624
die("cannot handle pushes this big");

sequencer.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,7 +1670,8 @@ static int update_squash_messages(enum todo_command command,
16701670
return res;
16711671
}
16721672

1673-
static void flush_rewritten_pending(void) {
1673+
static void flush_rewritten_pending(void)
1674+
{
16741675
struct strbuf buf = STRBUF_INIT;
16751676
struct object_id newoid;
16761677
FILE *out;
@@ -1695,7 +1696,8 @@ static void flush_rewritten_pending(void) {
16951696
}
16961697

16971698
static void record_in_rewritten(struct object_id *oid,
1698-
enum todo_command next_command) {
1699+
enum todo_command next_command)
1700+
{
16991701
FILE *out = fopen_or_warn(rebase_path_rewritten_pending(), "a");
17001702

17011703
if (!out)

0 commit comments

Comments
 (0)