# [PATCH 0/7] Coding style fixes.

11 messages from 2015-01-23 to 2015-01-23. Participants: Alexander Kuleshov, Torsten Bögershausen, Stefan Beller.
Thread: https://gitlist.dev/t/38441

## Alexander Kuleshov, 2015-01-23 11:06

Subject: [PATCH 0/7] Coding style fixes.
Message-ID: <1422011208-3832-1-git-send-email-kuleshovmail@gmail.com>
URL: https://gitlist.dev/e/1422011208-3832-1-git-send-email-kuleshovmail%40gmail.com

```
This patch set contatins minor style fixes. CodingGuidelines contains
rule that the star must side with variable name.

Alexander Kuleshov (7):
  show-branch: minor style fix
  clone: minor style fix
  test-hashmap: minor style fix
  http-backend: minor style fix
  refs: minor style fix
  quote: minor style fix
  fast-import: minor style fix

 builtin/clone.c       | 2 +-
 builtin/show-branch.c | 2 +-
 fast-import.c         | 2 +-
 http-backend.c        | 2 +-
 quote.c               | 2 +-
 refs.h                | 2 +-
 test-hashmap.c        | 4 ++--
 7 files changed, 8 insertions(+), 8 deletions(-)

--
2.3.0.rc1.275.g028c360

```

## Alexander Kuleshov, 2015-01-23 11:07

Subject: [PATCH 1/7] show-branch: minor style fix
Message-ID: <1422011244-3900-1-git-send-email-kuleshovmail@gmail.com>
URL: https://gitlist.dev/e/1422011244-3900-1-git-send-email-kuleshovmail%40gmail.com
In-Reply-To: <1422011208-3832-1-git-send-email-kuleshovmail@gmail.com>

```
Asterisk must be next with variable

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 builtin/show-branch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index 3a7ec55..e7684c8 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -6,7 +6,7 @@
 #include "parse-options.h"
 #include "commit-slab.h"

-static const char* show_branch_usage[] = {
+static const char *show_branch_usage[] = {
     N_("git show-branch [-a | --all] [-r | --remotes] [--topo-order | --date-order]\n"
        "		[--current] [--color[=<when>] | --no-color] [--sparse]\n"
        "		[--more=<n> | --list | --independent | --merge-base]\n"
--
2.3.0.rc1.275.g028c360

```

## Alexander Kuleshov, 2015-01-23 11:08

Subject: [PATCH 2/7] clone: minor style fix
Message-ID: <1422011280-4007-1-git-send-email-kuleshovmail@gmail.com>
URL: https://gitlist.dev/e/1422011280-4007-1-git-send-email-kuleshovmail%40gmail.com
In-Reply-To: <1422011208-3832-1-git-send-email-kuleshovmail@gmail.com>

```
Asterisk must be next with variable

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 builtin/clone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/clone.c b/builtin/clone.c
index d262a4d..a1ca780 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -741,7 +741,7 @@ static void write_refspec_config(const char *src_ref_prefix,

 static void dissociate_from_references(void)
 {
-	static const char* argv[] = { "repack", "-a", "-d", NULL };
+	static const char *argv[] = { "repack", "-a", "-d", NULL };

 	if (run_command_v_opt(argv, RUN_GIT_CMD|RUN_COMMAND_NO_STDIN))
 		die(_("cannot repack to clean up"));
--
2.3.0.rc1.275.g028c360

```

## Alexander Kuleshov, 2015-01-23 11:08

Subject: [PATCH 3/7] test-hashmap: minor style fix
Message-ID: <1422011288-4062-1-git-send-email-kuleshovmail@gmail.com>
URL: https://gitlist.dev/e/1422011288-4062-1-git-send-email-kuleshovmail%40gmail.com
In-Reply-To: <1422011208-3832-1-git-send-email-kuleshovmail@gmail.com>

```
Asterisk must be next with variable

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 test-hashmap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test-hashmap.c b/test-hashmap.c
index cc2891d..5f67120 100644
--- a/test-hashmap.c
+++ b/test-hashmap.c
@@ -14,13 +14,13 @@ static const char *get_value(const struct test_entry *e)
 }

 static int test_entry_cmp(const struct test_entry *e1,
-		const struct test_entry *e2, const char* key)
+		const struct test_entry *e2, const char *key)
 {
 	return strcmp(e1->key, key ? key : e2->key);
 }

 static int test_entry_cmp_icase(const struct test_entry *e1,
-		const struct test_entry *e2, const char* key)
+		const struct test_entry *e2, const char *key)
 {
 	return strcasecmp(e1->key, key ? key : e2->key);
 }
--
2.3.0.rc1.275.g028c360

```

## Alexander Kuleshov, 2015-01-23 11:08

Subject: [PATCH 4/7] http-backend: minor style fix
Message-ID: <1422011297-4116-1-git-send-email-kuleshovmail@gmail.com>
URL: https://gitlist.dev/e/1422011297-4116-1-git-send-email-kuleshovmail%40gmail.com
In-Reply-To: <1422011208-3832-1-git-send-email-kuleshovmail@gmail.com>

```
Asterisk must be next with variable

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 http-backend.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/http-backend.c b/http-backend.c
index b6c0484..7b5670b 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -515,7 +515,7 @@ static NORETURN void die_webcgi(const char *err, va_list params)
 	exit(0); /* we successfully reported a failure ;-) */
 }

-static char* getdir(void)
+static char *getdir(void)
 {
 	struct strbuf buf = STRBUF_INIT;
 	char *pathinfo = getenv("PATH_INFO");
--
2.3.0.rc1.275.g028c360

```

## Alexander Kuleshov, 2015-01-23 11:08

Subject: [PATCH 5/7] refs: minor style fix
Message-ID: <1422011305-4170-1-git-send-email-kuleshovmail@gmail.com>
URL: https://gitlist.dev/e/1422011305-4170-1-git-send-email-kuleshovmail%40gmail.com
In-Reply-To: <1422011208-3832-1-git-send-email-kuleshovmail@gmail.com>

```
Asterisk must be next with variable

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 refs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/refs.h b/refs.h
index 425ecf7..bd8afe2 100644
--- a/refs.h
+++ b/refs.h
@@ -86,7 +86,7 @@ extern int for_each_branch_ref(each_ref_fn, void *);
 extern int for_each_remote_ref(each_ref_fn, void *);
 extern int for_each_replace_ref(each_ref_fn, void *);
 extern int for_each_glob_ref(each_ref_fn, const char *pattern, void *);
-extern int for_each_glob_ref_in(each_ref_fn, const char *pattern, const char* prefix, void *);
+extern int for_each_glob_ref_in(each_ref_fn, const char *pattern, const char *prefix, void *);

 extern int head_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data);
 extern int for_each_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data);
--
2.3.0.rc1.275.g028c360

```

## Alexander Kuleshov, 2015-01-23 11:08

Subject: [PATCH 6/7] quote: minor style fix
Message-ID: <1422011313-4224-1-git-send-email-kuleshovmail@gmail.com>
URL: https://gitlist.dev/e/1422011313-4224-1-git-send-email-kuleshovmail%40gmail.com
In-Reply-To: <1422011208-3832-1-git-send-email-kuleshovmail@gmail.com>

```
Asterisk must be next with variable

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 quote.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/quote.c b/quote.c
index 7920e18..02e9a3c 100644
--- a/quote.c
+++ b/quote.c
@@ -42,7 +42,7 @@ void sq_quote_buf(struct strbuf *dst, const char *src)
 	free(to_free);
 }

-void sq_quote_argv(struct strbuf *dst, const char** argv, size_t maxlen)
+void sq_quote_argv(struct strbuf *dst, const char **argv, size_t maxlen)
 {
 	int i;

--
2.3.0.rc1.275.g028c360

```

## Alexander Kuleshov, 2015-01-23 11:08

Subject: [PATCH 7/7] fast-import: minor style fix
Message-ID: <1422011323-4278-1-git-send-email-kuleshovmail@gmail.com>
URL: https://gitlist.dev/e/1422011323-4278-1-git-send-email-kuleshovmail%40gmail.com
In-Reply-To: <1422011208-3832-1-git-send-email-kuleshovmail@gmail.com>

```
Asterisk must be next with variable

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 fast-import.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fast-import.c b/fast-import.c
index 1b50923..fec67ca 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -3110,7 +3110,7 @@ static void parse_progress(void)
 	skip_optional_lf();
 }

-static char* make_fast_import_path(const char *path)
+static char *make_fast_import_path(const char *path)
 {
 	if (!relative_marks_paths || is_absolute_path(path))
 		return xstrdup(path);
--
2.3.0.rc1.275.g028c360

```

## Alexander Kuleshov, 2015-01-23 12:09

Subject: Re: [PATCH 0/7] Coding style fixes.
Message-ID: <CANCZXo4Ga5a0OjNhqSOP39p76RfOOX+N5cZhA8j9hjhKodTqcg@mail.gmail.com>
URL: https://gitlist.dev/e/CANCZXo4Ga5a0OjNhqSOP39p76RfOOX%2BN5cZhA8j9hjhKodTqcg%40mail.gmail.com
In-Reply-To: <1422011208-3832-1-git-send-email-kuleshovmail@gmail.com>

```
I made separate patch for every file. Please, let me know if need to
squash it into one commit.


2015-01-23 17:06 GMT+06:00 Alexander Kuleshov <kuleshovmail@gmail.com>:
> This patch set contatins minor style fixes. CodingGuidelines contains
> rule that the star must side with variable name.
>
> Alexander Kuleshov (7):
>   show-branch: minor style fix
>   clone: minor style fix
>   test-hashmap: minor style fix
>   http-backend: minor style fix
>   refs: minor style fix
>   quote: minor style fix
>   fast-import: minor style fix
>
>  builtin/clone.c       | 2 +-
>  builtin/show-branch.c | 2 +-
>  fast-import.c         | 2 +-
>  http-backend.c        | 2 +-
>  quote.c               | 2 +-
>  refs.h                | 2 +-
>  test-hashmap.c        | 4 ++--
>  7 files changed, 8 insertions(+), 8 deletions(-)
>
> --
> 2.3.0.rc1.275.g028c360



-- 
_________________________
0xAX

```

## Torsten Bögershausen, 2015-01-23 12:22

Subject: Re: [PATCH 7/7] fast-import: minor style fix
Message-ID: <54C23D0C.8020207@web.de>
URL: https://gitlist.dev/e/54C23D0C.8020207%40web.de
In-Reply-To: <1422011323-4278-1-git-send-email-kuleshovmail@gmail.com>

```
On 2015-01-23 12.08, Alexander Kuleshov wrote:
..
Asterisk must be next with variable
..
But this is a function:
> -static char* make_fast_import_path(const char *path)
> +static char *make_fast_import_path(const char *path)

(Sorry when I need to read this:)

 - Fixing style violations while working on a real change as a
   preparatory clean-up step is good, but otherwise avoid useless code
   churn for the sake of conforming to the style.

   "Once it _is_ in the tree, it's not really worth the patch noise to
   go and fix it up."
   Cf. http://article.gmane.org/gmane.linux.kernel/943020

```

## Stefan Beller, 2015-01-23 18:36

Subject: Re: [PATCH 0/7] Coding style fixes.
Message-ID: <CAGZ79kYPHv7UCy1jzf=0WeRP7od+3pZ61Rps9NK6_qbwER_Jjw@mail.gmail.com>
URL: https://gitlist.dev/e/CAGZ79kYPHv7UCy1jzf%3D0WeRP7od%2B3pZ61Rps9NK6_qbwER_Jjw%40mail.gmail.com
In-Reply-To: <CANCZXo4Ga5a0OjNhqSOP39p76RfOOX+N5cZhA8j9hjhKodTqcg@mail.gmail.com>

```
On Fri, Jan 23, 2015 at 4:09 AM, Alexander Kuleshov
<kuleshovmail@gmail.com> wrote:
> I made separate patch for every file. Please, let me know if need to
> squash it into one commit.
>
>
> 2015-01-23 17:06 GMT+06:00 Alexander Kuleshov <kuleshovmail@gmail.com>:
>> This patch set contatins minor style fixes. CodingGuidelines contains
>> rule that the star must side with variable name.
>>

The whole series is
Reviewed-by: Stefan Beller <sbeller@google.com>

```
