{"thread":{"id":"28217","subject":"[PATCH] update-ref: whitespace fix","startedAt":"2011-08-25T15:40:50Z","lastAt":"2011-08-25T21:48:08Z","messageCount":2,"participants":["pangyanhan@gmail.com","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"174232","messageId":"1314286850-11080-1-git-send-email-pangyanhan@gmail.com","threadId":"28217","inReplyTo":null,"subject":"[PATCH] update-ref: whitespace fix","fromName":"","fromEmail":"pangyanhan@gmail.com","sentAt":"2011-08-25T15:40:50Z","receivedAt":"2011-08-25T15:40:50Z","isPatch":true,"sender":{"key":"pangyanhan@gmail.com","avatar":"https://avatars.githubusercontent.com/u/539739?v=4"},"body":"From: Pang Yan Han <pangyanhan@gmail.com>\n\nSigned-off-by: Pang Yan Han <pangyanhan@gmail.com>\n---\n builtin/update-ref.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/update-ref.c b/builtin/update-ref.c\nindex 76ba1d5..835c62a 100644\n--- a/builtin/update-ref.c\n+++ b/builtin/update-ref.c\n@@ -11,7 +11,7 @@ static const char * const git_update_ref_usage[] = {\n \n int cmd_update_ref(int argc, const char **argv, const char *prefix)\n {\n-\tconst char *refname, *oldval, *msg=NULL;\n+\tconst char *refname, *oldval, *msg = NULL;\n \tunsigned char sha1[20], oldsha1[20];\n \tint delete = 0, no_deref = 0, flags = 0;\n \tstruct option options[] = {\n-- \n1.7.6.1.385.gb7fcd0\n"},{"id":"174273","messageId":"7vliuhi2nb.fsf@alter.siamese.dyndns.org","threadId":"28217","inReplyTo":"1314286850-11080-1-git-send-email-pangyanhan@gmail.com","subject":"Re: [PATCH] update-ref: whitespace fix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-08-25T21:48:08Z","receivedAt":"2011-08-25T21:48:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"pangyanhan@gmail.com writes:\n\n> From: Pang Yan Han <pangyanhan@gmail.com>\n>\n> Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>\n> ---\n>  builtin/update-ref.c |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n>\n> diff --git a/builtin/update-ref.c b/builtin/update-ref.c\n> index 76ba1d5..835c62a 100644\n> --- a/builtin/update-ref.c\n> +++ b/builtin/update-ref.c\n> @@ -11,7 +11,7 @@ static const char * const git_update_ref_usage[] = {\n>  \n>  int cmd_update_ref(int argc, const char **argv, const char *prefix)\n>  {\n> -\tconst char *refname, *oldval, *msg=NULL;\n> +\tconst char *refname, *oldval, *msg = NULL;\n\nHeh, thanks. There are some more.\n\n-- >8 --\nSubject: [PATCH] whitespace: have SP on both sides of an assignment \"=\"\n\nI've deliberately excluded the borrowed code in compat/nedmalloc\ndirectory.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/remote.c |    2 +-\n commit.c         |    2 +-\n http-push.c      |    2 +-\n read-cache.c     |    2 +-\n 4 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin/remote.c b/builtin/remote.c\nindex 9ff1cac..1fb441c 100644\n--- a/builtin/remote.c\n+++ b/builtin/remote.c\n@@ -1113,7 +1113,7 @@ static int show(int argc, const char **argv)\n \t\t\turl = states.remote->url;\n \t\t\turl_nr = states.remote->url_nr;\n \t\t}\n-\t\tfor (i=0; i < url_nr; i++)\n+\t\tfor (i = 0; i < url_nr; i++)\n \t\t\tprintf(\"  Push  URL: %s\\n\", url[i]);\n \t\tif (!i)\n \t\t\tprintf(\"  Push  URL: %s\\n\", \"(no URL)\");\ndiff --git a/commit.c b/commit.c\nindex ac337c7..913dbab 100644\n--- a/commit.c\n+++ b/commit.c\n@@ -515,7 +515,7 @@ void sort_in_topological_order(struct commit_list ** list, int lifo)\n \n \t\tcommit = work_item->item;\n \t\tfor (parents = commit->parents; parents ; parents = parents->next) {\n-\t\t\tstruct commit *parent=parents->item;\n+\t\t\tstruct commit *parent = parents->item;\n \n \t\t\tif (!parent->indegree)\n \t\t\t\tcontinue;\ndiff --git a/http-push.c b/http-push.c\nindex 6e8f6d0..376331a 100644\n--- a/http-push.c\n+++ b/http-push.c\n@@ -1655,7 +1655,7 @@ static int delete_remote_branch(const char *pattern, int force)\n \t\treturn error(\"Remote HEAD is not a symref\");\n \n \t/* Remote branch must not be the remote HEAD */\n-\tfor (i=0; symref && i<MAXDEPTH; i++) {\n+\tfor (i = 0; symref && i < MAXDEPTH; i++) {\n \t\tif (!strcmp(remote_ref->name, symref))\n \t\t\treturn error(\"Remote branch %s is the current HEAD\",\n \t\t\t\t     remote_ref->name);\ndiff --git a/read-cache.c b/read-cache.c\nindex 4ac9a03..0a64103 100644\n--- a/read-cache.c\n+++ b/read-cache.c\n@@ -1087,7 +1087,7 @@ static void show_file(const char * fmt, const char * name, int in_porcelain,\n {\n \tif (in_porcelain && *first && header_msg) {\n \t\tprintf(\"%s\\n\", header_msg);\n-\t\t*first=0;\n+\t\t*first = 0;\n \t}\n \tprintf(fmt, name);\n }\n-- \n1.7.6.1.385.gb7fcd0\n"}]}