{"thread":{"id":"36021","subject":"[PATCH] branch.c: change install_branch_config() to use skip_prefix()","startedAt":"2014-03-02T11:52:27Z","lastAt":"2014-03-02T16:01:41Z","messageCount":3,"participants":["Guanglin Xu","Jacopo Notarstefano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"235797","messageId":"1393761147-13590-1-git-send-email-mzguanglin@gmail.com","threadId":"36021","inReplyTo":null,"subject":"[PATCH] branch.c: change install_branch_config() to use skip_prefix()","fromName":"Guanglin Xu","fromEmail":"mzguanglin@gmail.com","sentAt":"2014-03-02T11:52:27Z","receivedAt":"2014-03-02T11:52:27Z","isPatch":true,"sender":{"key":"mzguanglin@gmail.com","avatar":"https://gravatar.com/avatar/fb3a07ac20762e91fec45813fa7b91f5497c3ed748441e9d14e888900d5653c0?d=mp&s=160"},"body":"GSoC2014 Microproject: according to the idea#2 for microprojects, change install_branch_config() to use skip_prefix() and make it conform to the usage of previous starts_with().\n\nSigned-off-by: Guanglin Xu <mzguanglin@gmail.com>\n---\n branch.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/branch.c b/branch.c\nindex 723a36b..ca4e824 100644\n--- a/branch.c\n+++ b/branch.c\n@@ -50,7 +50,7 @@ static int should_setup_rebase(const char *origin)\n void install_branch_config(int flag, const char *local, const char *origin, const char *remote)\n {\n \tconst char *shortname = remote + 11;\n-\tint remote_is_branch = starts_with(remote, \"refs/heads/\");\n+\tint remote_is_branch = (NULL != skip_prefix(remote ,\"refs/heads/\"));\n \tstruct strbuf key = STRBUF_INIT;\n \tint rebasing = should_setup_rebase(origin);\n \n-- \n1.9.0\n\nHi,\nI am Guanglin Xu. I plan to apply for GSoC 2014.\n"},{"id":"235798","messageId":"CAL0uuq0Vc7uZdixLV6OciAZWFYcif_WMCNABEvC=6gT5s+mthQ@mail.gmail.com","threadId":"36021","inReplyTo":"1393761147-13590-1-git-send-email-mzguanglin@gmail.com","subject":"Re: [PATCH] branch.c: change install_branch_config() to use skip_prefix()","fromName":"Jacopo Notarstefano","fromEmail":"jacopo.notarstefano@gmail.com","sentAt":"2014-03-02T14:01:02Z","receivedAt":"2014-03-02T14:01:02Z","isPatch":true,"sender":{"key":"jacopo.notarstefano@gmail.com","avatar":"https://avatars.githubusercontent.com/u/381280?v=4"},"body":"The part about this being a GSoC microproject should go below the\nthree dashes, since it's not information that needs to\n be recorded in the codebase.\n\nOn Sun, Mar 2, 2014 at 12:52 PM, Guanglin Xu <mzguanglin@gmail.com> wrote:\n> GSoC2014 Microproject: according to the idea#2 for microprojects, change install_branch_config() to use skip_prefix() and make it conform to the usage of previous starts_with().\n>\n> Signed-off-by: Guanglin Xu <mzguanglin@gmail.com>\n> ---\n>  branch.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/branch.c b/branch.c\n> index 723a36b..ca4e824 100644\n> --- a/branch.c\n> +++ b/branch.c\n> @@ -50,7 +50,7 @@ static int should_setup_rebase(const char *origin)\n>  void install_branch_config(int flag, const char *local, const char *origin, const char *remote)\n>  {\n>         const char *shortname = remote + 11;\n> -       int remote_is_branch = starts_with(remote, \"refs/heads/\");\n> +       int remote_is_branch = (NULL != skip_prefix(remote ,\"refs/heads/\"));\n>         struct strbuf key = STRBUF_INIT;\n>         int rebasing = should_setup_rebase(origin);\n>\n> --\n> 1.9.0\n>\n> Hi,\n> I am Guanglin Xu. I plan to apply for GSoC 2014.\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"235803","messageId":"CAATe9uiCz_fe65=O_qVUX5OWbbFj4nqBZDsB_0dMt175HLCFDg@mail.gmail.com","threadId":"36021","inReplyTo":"CAL0uuq0Vc7uZdixLV6OciAZWFYcif_WMCNABEvC=6gT5s+mthQ@mail.gmail.com","subject":"Re: [PATCH] branch.c: change install_branch_config() to use skip_prefix()","fromName":"Guanglin Xu","fromEmail":"mzguanglin@gmail.com","sentAt":"2014-03-02T16:01:41Z","receivedAt":"2014-03-02T16:01:41Z","isPatch":true,"sender":{"key":"mzguanglin@gmail.com","avatar":"https://gravatar.com/avatar/fb3a07ac20762e91fec45813fa7b91f5497c3ed748441e9d14e888900d5653c0?d=mp&s=160"},"body":"Hi Jacopo,\n\nThanks for your comments. I just update this PATCH as v2. I appreciate\nmore comments from you and others in the new thread.\n\nRegards,\n\nGuanglin\n\n2014-03-02 22:01 GMT+08:00 Jacopo Notarstefano <jacopo.notarstefano@gmail.com>:\n> The part about this being a GSoC microproject should go below the\n> three dashes, since it's not information that needs to\n>  be recorded in the codebase.\n>\n> On Sun, Mar 2, 2014 at 12:52 PM, Guanglin Xu <mzguanglin@gmail.com> wrote:\n>> GSoC2014 Microproject: according to the idea#2 for microprojects, change install_branch_config() to use skip_prefix() and make it conform to the usage of previous starts_with().\n>>\n>> Signed-off-by: Guanglin Xu <mzguanglin@gmail.com>\n>> ---\n>>  branch.c | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/branch.c b/branch.c\n>> index 723a36b..ca4e824 100644\n>> --- a/branch.c\n>> +++ b/branch.c\n>> @@ -50,7 +50,7 @@ static int should_setup_rebase(const char *origin)\n>>  void install_branch_config(int flag, const char *local, const char *origin, const char *remote)\n>>  {\n>>         const char *shortname = remote + 11;\n>> -       int remote_is_branch = starts_with(remote, \"refs/heads/\");\n>> +       int remote_is_branch = (NULL != skip_prefix(remote ,\"refs/heads/\"));\n>>         struct strbuf key = STRBUF_INIT;\n>>         int rebasing = should_setup_rebase(origin);\n>>\n>> --\n>> 1.9.0\n>>\n>> Hi,\n>> I am Guanglin Xu. I plan to apply for GSoC 2014.\n>> --\n>> To unsubscribe from this list: send the line \"unsubscribe git\" in\n>> the body of a message to majordomo@vger.kernel.org\n>> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"}]}