{"thread":{"id":"36270","subject":"[PATCH 1/2] diff-no-index.c: rename read_directory()","startedAt":"2014-03-21T18:56:57Z","lastAt":"2014-03-21T19:09:03Z","messageCount":2,"participants":["Andrei Dinu","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"237348","messageId":"1395428217-7669-1-git-send-email-mandrei.dinu@gmail.com","threadId":"36270","inReplyTo":null,"subject":"[PATCH 1/2] diff-no-index.c: rename read_directory()","fromName":"Andrei Dinu","fromEmail":"mandrei.dinu@gmail.com","sentAt":"2014-03-21T18:56:57Z","receivedAt":"2014-03-21T18:56:57Z","isPatch":true,"sender":{"key":"mandrei.dinu@gmail.com","avatar":null},"body":"\nA subsequent patch will include dir.h in diff-no-index.c to \naccess is_dot_or_dotdot(), however, dir.h declared a \nread_directory() which conflicts with a (different) \nread_directory() defined in diff-no-index.c. Rename\nread_directory() from diff-no-index.c to avoid the conflict.\n\nSigned-off-by: Andrei Dinu <mandrei.dinu@gmail.com>\n\n---\n\n I plan on applying to GSoc 2014\n\n I received your feedback and I resend the patches from the bug that I\n solved in the past\n\n diff-no-index.c |    6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/diff-no-index.c b/diff-no-index.c\nindex 8e10bff..5e4a76c 100644\n--- a/diff-no-index.c\n+++ b/diff-no-index.c\n@@ -16,7 +16,7 @@\n #include \"builtin.h\"\n #include \"string-list.h\"\n \n-static int read_directory(const char *path, struct string_list *list)\n+static int read_directory_path(const char *path, struct string_list *list)\n {\n \tDIR *dir;\n \tstruct dirent *e;\n@@ -107,9 +107,9 @@ static int queue_diff(struct diff_options *o,\n \t\tint i1, i2, ret = 0;\n \t\tsize_t len1 = 0, len2 = 0;\n \n-\t\tif (name1 && read_directory(name1, &p1))\n+\t\tif (name1 && read_directory_path(name1, &p1))\n \t\t\treturn -1;\n-\t\tif (name2 && read_directory(name2, &p2)) {\n+\t\tif (name2 && read_directory_path(name2, &p2)) {\n \t\t\tstring_list_clear(&p1, 0);\n \t\t\treturn -1;\n \t\t}\n-- \n1.7.9.5\n"},{"id":"237351","messageId":"CAPig+cSfNdGaDinK9E3AcqqXj_Sz+Ouq361tCAUf-3yx60i_Xw@mail.gmail.com","threadId":"36270","inReplyTo":"1395428217-7669-1-git-send-email-mandrei.dinu@gmail.com","subject":"Re: [PATCH 1/2] diff-no-index.c: rename read_directory()","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2014-03-21T19:09:03Z","receivedAt":"2014-03-21T19:09:03Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Fri, Mar 21, 2014 at 2:56 PM, Andrei Dinu <mandrei.dinu@gmail.com> wrote:\n> Subject: [PATCH 1/2] diff-no-index.c: rename read_directory()\n\nIt is helpful to reviewers if you indicate that this is a resubmission\nby placing 'vN' inside [...], where N is the reroll number. For\ninstance, if this is your fourth version of the patch, you would say\n[PATCH v4 1/2]. The -v option of \"git format-patch\" can help.\n\n> A subsequent patch will include dir.h in diff-no-index.c to\n> access is_dot_or_dotdot(), however, dir.h declared a\n\ns/declared/declares/\n\n> read_directory() which conflicts with a (different)\n> read_directory() defined in diff-no-index.c. Rename\n> read_directory() from diff-no-index.c to avoid the conflict.\n>\n> Signed-off-by: Andrei Dinu <mandrei.dinu@gmail.com>\n>\n> ---\n>\n>  I plan on applying to GSoc 2014\n>\n>  I received your feedback and I resend the patches from the bug that I\n>  solved in the past\n\nOther than the minor comment above about vN and the typo, both patches\nlook fine. Thanks.\n\nNo need to resend.\n\n>  diff-no-index.c |    6 +++---\n>  1 file changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/diff-no-index.c b/diff-no-index.c\n> index 8e10bff..5e4a76c 100644\n> --- a/diff-no-index.c\n> +++ b/diff-no-index.c\n> @@ -16,7 +16,7 @@\n>  #include \"builtin.h\"\n>  #include \"string-list.h\"\n>\n> -static int read_directory(const char *path, struct string_list *list)\n> +static int read_directory_path(const char *path, struct string_list *list)\n>  {\n>         DIR *dir;\n>         struct dirent *e;\n> @@ -107,9 +107,9 @@ static int queue_diff(struct diff_options *o,\n>                 int i1, i2, ret = 0;\n>                 size_t len1 = 0, len2 = 0;\n>\n> -               if (name1 && read_directory(name1, &p1))\n> +               if (name1 && read_directory_path(name1, &p1))\n>                         return -1;\n> -               if (name2 && read_directory(name2, &p2)) {\n> +               if (name2 && read_directory_path(name2, &p2)) {\n>                         string_list_clear(&p1, 0);\n>                         return -1;\n>                 }\n> --\n> 1.7.9.5\n"}]}