{"thread":{"id":"36156","subject":"[PATCH] microproject for GSOC","startedAt":"2014-03-14T16:42:47Z","lastAt":"2014-03-14T18:59:04Z","messageCount":5,"participants":["ubuntu733","Matthieu Moy","沈承恩"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"236730","messageId":"1394815367-9706-1-git-send-email-ubuntu2012@126.com","threadId":"36156","inReplyTo":null,"subject":"[PATCH] microproject for GSOC","fromName":"ubuntu733","fromEmail":"ubuntu2012@126.com","sentAt":"2014-03-14T16:42:47Z","receivedAt":"2014-03-14T16:42:47Z","isPatch":true,"sender":{"key":"ubuntu2012@126.com","avatar":null},"body":"Apply for GSOC.The microprojects is rewriter diff-index.c\n\nSigned-off-by: ubuntu733 <ubuntu2012@126.com>\n---\n diff-no-index.c |   11 ++++++-----\n dir.h           |    3 ++-\n 2 files changed, 8 insertions(+), 6 deletions(-)\n\ndiff --git a/diff-no-index.c b/diff-no-index.c\nindex 8e10bff..91ece64 100644\n--- a/diff-no-index.c\n+++ b/diff-no-index.c\n@@ -3,7 +3,7 @@\n  * Copyright (c) 2007 by Johannes Schindelin\n  * Copyright (c) 2008 by Junio C Hamano\n  */\n-\n+#define REMOVE 1\n #include \"cache.h\"\n #include \"color.h\"\n #include \"commit.h\"\n@@ -24,10 +24,11 @@ static int read_directory(const char *path, struct string_list *list)\n \tif (!(dir = opendir(path)))\n \t\treturn error(\"Could not open directory %s\", path);\n \n-\twhile ((e = readdir(dir)))\n-\t\tif (strcmp(\".\", e->d_name) && strcmp(\"..\", e->d_name))\n-\t\t\tstring_list_insert(list, e->d_name);\n-\n+\twhile ((e = readdir(dir))) {\n+\t\twhile(is_dot_or_dotdot(e->d_name))\n+                      break;\n+\t\tstring_list_insert(list, e->d_name);\n+              }\n \tclosedir(dir);\n \treturn 0;\n }\ndiff --git a/dir.h b/dir.h\nindex 55e5345..1d68818 100644\n--- a/dir.h\n+++ b/dir.h\n@@ -138,8 +138,9 @@ extern int match_pathspec(const struct pathspec *pathspec,\n extern int within_depth(const char *name, int namelen, int depth, int max_depth);\n \n extern int fill_directory(struct dir_struct *dir, const struct pathspec *pathspec);\n+#ifndef REMOVE\n extern int read_directory(struct dir_struct *, const char *path, int len, const struct pathspec *pathspec);\n-\n+#endif\n extern int is_excluded_from_list(const char *pathname, int pathlen, const char *basename,\n \t\t\t\t int *dtype, struct exclude_list *el);\n struct dir_entry *dir_add_ignored(struct dir_struct *dir, const char *pathname, int len);\n-- \n1.7.9.5\n"},{"id":"236735","messageId":"vpq4n30aeou.fsf@anie.imag.fr","threadId":"36156","inReplyTo":"1394815367-9706-1-git-send-email-ubuntu2012@126.com","subject":"Re: [PATCH] microproject for GSOC","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2014-03-14T17:10:57Z","receivedAt":"2014-03-14T17:10:57Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Hi,\n\nWelcome to the Git community, and welcome to the GSOC program. Below are\nsome comments to give you a taste of what a review looks like on this\nlist. Do take the comments seriously (they should be addressed), but\ndon't take them badly: critic is meant to be constructive.\n\nubuntu733 <ubuntu2012@126.com> writes:\n^^^^^^^^^\n\nPlease, use a real name when you contribute to Git.\n\n> Apply for GSOC.The microprojects is rewriter diff-index.c\n\nThis part of your message will become the commit message (i.e. cast in\nstone forever in git.git's history). The point is not that you want to\napply for GSOC, but what the patch does and more importantly why it does\nit.\n\n> +#define REMOVE 1\n\nIf the code is to be removed, then remove it. That's why we use a\nversion control system ;-).\n\n> -\twhile ((e = readdir(dir)))\n> -\t\tif (strcmp(\".\", e->d_name) && strcmp(\"..\", e->d_name))\n> -\t\t\tstring_list_insert(list, e->d_name);\n> -\n> +\twhile ((e = readdir(dir))) {\n> +\t\twhile(is_dot_or_dotdot(e->d_name))\n\nMissing space between \"while\" and \"(\".\n\n> +                      break;\n\nBroken indentation (indent with space).\n\nThis while (...) break; seems really weird to me: if the condition is\nfalse, then you exit the loop because it's a while loop, and if the\ncondition is true, you exit the loop because of the break. Isn't that a\nno-op?\n\n> +\t\tstring_list_insert(list, e->d_name);\n> +              }\n\nBroken indentation (misplaced }).\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"236739","messageId":"6c0ae8fc.7d.144c1b22cd7.Coremail.ubuntu2012@126.com","threadId":"36156","inReplyTo":"vpq4n30aeou.fsf@anie.imag.fr","subject":"Re:Re: [PATCH] microproject for GSOC","fromName":"沈承恩","fromEmail":"ubuntu2012@126.com","sentAt":"2014-03-14T17:44:43Z","receivedAt":"2014-03-14T17:44:43Z","isPatch":true,"sender":{"key":"ubuntu2012@126.com","avatar":null},"body":"Thank you for your comments.I will amend those issues .As a Chinese student,what name should I use?My Chinese name is ok?\nAt 2014-03-15 01:10:57,\"Matthieu Moy\" <Matthieu.Moy@grenoble-inp.fr> wrote:\n>Hi,\n>\n>Welcome to the Git community, and welcome to the GSOC program. Below are\n>some comments to give you a taste of what a review looks like on this\n>list. Do take the comments seriously (they should be addressed), but\n>don't take them badly: critic is meant to be constructive.\n>\n>ubuntu733 <ubuntu2012@126.com> writes:\n>^^^^^^^^^\n>\n>Please, use a real name when you contribute to Git.\n>\n>> Apply for GSOC.The microprojects is rewriter diff-index.c\n>\n>This part of your message will become the commit message (i.e. cast in\n>stone forever in git.git's history). The point is not that you want to\n>apply for GSOC, but what the patch does and more importantly why it does\n>it.\n>\n>> +#define REMOVE 1\n>\n>If the code is to be removed, then remove it. That's why we use a\n>version control system ;-).\n>\n>> -\twhile ((e = readdir(dir)))\n>> -\t\tif (strcmp(\".\", e->d_name) && strcmp(\"..\", e->d_name))\n>> -\t\t\tstring_list_insert(list, e->d_name);\n>> -\n>> +\twhile ((e = readdir(dir))) {\n>> +\t\twhile(is_dot_or_dotdot(e->d_name))\n>\n>Missing space between \"while\" and \"(\".\n>\n>> +                      break;\n>\n>Broken indentation (indent with space).\n>\n>This while (...) break; seems really weird to me: if the condition is\n>false, then you exit the loop because it's a while loop, and if the\n>condition is true, you exit the loop because of the break. Isn't that a\n>no-op?\n>\n>> +\t\tstring_list_insert(list, e->d_name);\n>> +              }\n>\n>Broken indentation (misplaced }).\n>\n>-- \n>Matthieu Moy\n>http://www-verimag.imag.fr/~moy/\n"},{"id":"236738","messageId":"41f601c6.a3.144c1cc2f20.Coremail.ubuntu2012@126.com","threadId":"36156","inReplyTo":"vpq4n30aeou.fsf@anie.imag.fr","subject":"Re:Re: [PATCH] microproject for GSOC","fromName":"沈承恩","fromEmail":"ubuntu2012@126.com","sentAt":"2014-03-14T18:13:07Z","receivedAt":"2014-03-14T18:13:07Z","isPatch":true,"sender":{"key":"ubuntu2012@126.com","avatar":null},"body":"Thank you for your comments.I will amend those issues .As a Chinese student,what name should I use?My Chinese name is ok?\nI am very interest in Open source.What can I do to increase my chance?\nAt 2014-03-15 01:10:57,\"Matthieu Moy\" <Matthieu.Moy@grenoble-inp.fr> wrote:\n>Hi,\n>\n>Welcome to the Git community, and welcome to the GSOC program. Below are\n>some comments to give you a taste of what a review looks like on this\n>list. Do take the comments seriously (they should be addressed), but\n>don't take them badly: critic is meant to be constructive.\n>\n>ubuntu733 <ubuntu2012@126.com> writes:\n>^^^^^^^^^\n>\n>Please, use a real name when you contribute to Git.\n>\n>> Apply for GSOC.The microprojects is rewriter diff-index.c\n>\n>This part of your message will become the commit message (i.e. cast in\n>stone forever in git.git's history). The point is not that you want to\n>apply for GSOC, but what the patch does and more importantly why it does\n>it.\n>\n>> +#define REMOVE 1\n>\n>If the code is to be removed, then remove it. That's why we use a\n>version control system ;-).\n>\n>> -\twhile ((e = readdir(dir)))\n>> -\t\tif (strcmp(\".\", e->d_name) && strcmp(\"..\", e->d_name))\n>> -\t\t\tstring_list_insert(list, e->d_name);\n>> -\n>> +\twhile ((e = readdir(dir))) {\n>> +\t\twhile(is_dot_or_dotdot(e->d_name))\n>\n>Missing space between \"while\" and \"(\".\n>\n>> +                      break;\n>\n>Broken indentation (indent with space).\n>\n>This while (...) break; seems really weird to me: if the condition is\n>false, then you exit the loop because it's a while loop, and if the\n>condition is true, you exit the loop because of the break. Isn't that a\n>no-op?\n>\n>> +\t\tstring_list_insert(list, e->d_name);\n>> +              }\n>\n>Broken indentation (misplaced }).\n>\n>-- \n>Matthieu Moy\n>http://www-verimag.imag.fr/~moy/\n"},{"id":"236741","messageId":"vpqlhwc8v47.fsf@anie.imag.fr","threadId":"36156","inReplyTo":"41f601c6.a3.144c1cc2f20.Coremail.ubuntu2012@126.com","subject":"Re: [PATCH] microproject for GSOC","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2014-03-14T18:59:04Z","receivedAt":"2014-03-14T18:59:04Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"沈承恩 <ubuntu2012@126.com> writes:\n\n> Thank you for your comments.I will amend those issues .As a Chinese\n> student,what name should I use?My Chinese name is ok?\n\nI guess it is. The git.git history already has contribution from 张忠山\nfor example (I don't know if it is chineese, but it looks so from my\nFrench eyes).\n\n> I am very interest in Open source.What can I do to increase my chance?\n\nInteresting blog post to read:\nhttp://softwareswirl.blogspot.fr/2014/03/my-secret-tip-for-gsoc-success.html\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"}]}