{"thread":{"id":"45047","subject":"[PATCH v2] parse-remote: Remove reference to unused op_prep","startedAt":"2017-02-04T08:00:52Z","lastAt":"2017-02-04T11:36:43Z","messageCount":3,"participants":["Siddharth Kannan","Pranit Bauva","siddharth"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"310842","messageId":"1486195204-26901-1-git-send-email-kannan.siddharth12@gmail.com","threadId":"45047","inReplyTo":null,"subject":"[PATCH v2] parse-remote: Remove reference to unused op_prep","fromName":"Siddharth Kannan","fromEmail":"kannan.siddharth12@gmail.com","sentAt":"2017-02-04T08:00:04Z","receivedAt":"2017-02-04T08:00:52Z","isPatch":true,"sender":{"key":"kannan.siddharth12@gmail.com","avatar":"https://gravatar.com/avatar/f555b34abc9cec49fd7e7ca4a55b58be0e0af0fc58e75b7887210199b7d4ca5a?d=mp&s=160"},"body":"The error_on_missing_default_upstream helper function learned to\ntake op_prep argument with 15a147e618 (\"rebase: use @{upstream}\nif no upstream specified\", 2011-02-09), but as of 045fac5845\n(\"i18n: git-parse-remote.sh: mark strings for translation\",\n 2016-04-19), the argument is no longer used.  Remove it.\n\nSigned-off-by: Siddharth Kannan <kannan.siddharth12@gmail.com>\n---\nThanks a lot, Pranit and Junio for your reviews on the first version of this\npatch. I have changed the messages accordingly.\n\n contrib/examples/git-pull.sh | 2 +-\n git-parse-remote.sh          | 3 +--\n git-rebase.sh                | 2 +-\n 3 files changed, 3 insertions(+), 4 deletions(-)\n\ndiff --git a/contrib/examples/git-pull.sh b/contrib/examples/git-pull.sh\nindex 6b3a03f..1d51dc3 100755\n--- a/contrib/examples/git-pull.sh\n+++ b/contrib/examples/git-pull.sh\n@@ -267,7 +267,7 @@ error_on_no_merge_candidates () {\n \t\techo \"for your current branch, you must specify a branch on the command line.\"\n \telif [ -z \"$curr_branch\" -o -z \"$upstream\" ]; then\n \t\t. git-parse-remote\n-\t\terror_on_missing_default_upstream \"pull\" $op_type $op_prep \\\n+\t\terror_on_missing_default_upstream \"pull\" $op_type \\\n \t\t\t\"git pull <remote> <branch>\"\n \telse\n \t\techo \"Your configuration specifies to $op_type $op_prep the ref '${upstream#refs/heads/}'\"\ndiff --git a/git-parse-remote.sh b/git-parse-remote.sh\nindex d3c3998..9698a05 100644\n--- a/git-parse-remote.sh\n+++ b/git-parse-remote.sh\n@@ -56,8 +56,7 @@ get_remote_merge_branch () {\n error_on_missing_default_upstream () {\n \tcmd=\"$1\"\n \top_type=\"$2\"\n-\top_prep=\"$3\" # FIXME: op_prep is no longer used\n-\texample=\"$4\"\n+\texample=\"$3\"\n \tbranch_name=$(git symbolic-ref -q HEAD)\n \tdisplay_branch_name=\"${branch_name#refs/heads/}\"\n \t# If there's only one remote, use that in the suggestion\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex 04f6e44..b89f960 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -448,7 +448,7 @@ then\n \t\tthen\n \t\t\t. git-parse-remote\n \t\t\terror_on_missing_default_upstream \"rebase\" \"rebase\" \\\n-\t\t\t\t\"against\" \"git rebase $(gettext '<branch>')\"\n+\t\t\t\t\"git rebase $(gettext '<branch>')\"\n \t\tfi\n \n \t\ttest \"$fork_point\" = auto && fork_point=t\n-- \n2.1.4\n\n"},{"id":"310845","messageId":"CAFZEwPPyJBD0a+Jkr7EBCurFzvHLvZY9r_SFWS2wyW7QmmP4pg@mail.gmail.com","threadId":"45047","inReplyTo":"1486195204-26901-1-git-send-email-kannan.siddharth12@gmail.com","subject":"Re: [PATCH v2] parse-remote: Remove reference to unused op_prep","fromName":"Pranit Bauva","fromEmail":"pranit.bauva@gmail.com","sentAt":"2017-02-04T11:25:45Z","receivedAt":"2017-02-04T11:25:52Z","isPatch":true,"sender":{"key":"pranit.bauva@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2959938?v=4"},"body":"Hey SIddharth,\n\n> Subject: parse-remote: Remove reference to unused op_prep\n                                         ^\n\nMinor nit: after the colon, we generally don't use the word starting\nwith an uppercase letter which I think can be figured out when you run\n`git log -p git-parse-remote.sh`\n\nOn Sat, Feb 4, 2017 at 1:30 PM, Siddharth Kannan\n<kannan.siddharth12@gmail.com> wrote:\n> The error_on_missing_default_upstream helper function learned to\n> take op_prep argument with 15a147e618 (\"rebase: use @{upstream}\n> if no upstream specified\", 2011-02-09), but as of 045fac5845\n> (\"i18n: git-parse-remote.sh: mark strings for translation\",\n>  2016-04-19), the argument is no longer used.  Remove it.\n>\n> Signed-off-by: Siddharth Kannan <kannan.siddharth12@gmail.com>\n> ---\n> Thanks a lot, Pranit and Junio for your reviews on the first version of this\n> patch. I have changed the messages accordingly.\n>\n>  contrib/examples/git-pull.sh | 2 +-\n>  git-parse-remote.sh          | 3 +--\n>  git-rebase.sh                | 2 +-\n>  3 files changed, 3 insertions(+), 4 deletions(-)\n>\n> diff --git a/contrib/examples/git-pull.sh b/contrib/examples/git-pull.sh\n> index 6b3a03f..1d51dc3 100755\n> --- a/contrib/examples/git-pull.sh\n> +++ b/contrib/examples/git-pull.sh\n> @@ -267,7 +267,7 @@ error_on_no_merge_candidates () {\n>                 echo \"for your current branch, you must specify a branch on the command line.\"\n>         elif [ -z \"$curr_branch\" -o -z \"$upstream\" ]; then\n>                 . git-parse-remote\n> -               error_on_missing_default_upstream \"pull\" $op_type $op_prep \\\n> +               error_on_missing_default_upstream \"pull\" $op_type \\\n>                         \"git pull <remote> <branch>\"\n>         else\n>                 echo \"Your configuration specifies to $op_type $op_prep the ref '${upstream#refs/heads/}'\"\n\nI guess I suggested you to not change the file in contrib/ in my\nearlier email[1] and to which Junio agreed too[2]. Is there any\nconfusion?\n\n> diff --git a/git-parse-remote.sh b/git-parse-remote.sh\n> index d3c3998..9698a05 100644\n> --- a/git-parse-remote.sh\n> +++ b/git-parse-remote.sh\n> @@ -56,8 +56,7 @@ get_remote_merge_branch () {\n>  error_on_missing_default_upstream () {\n>         cmd=\"$1\"\n>         op_type=\"$2\"\n> -       op_prep=\"$3\" # FIXME: op_prep is no longer used\n> -       example=\"$4\"\n> +       example=\"$3\"\n>         branch_name=$(git symbolic-ref -q HEAD)\n>         display_branch_name=\"${branch_name#refs/heads/}\"\n>         # If there's only one remote, use that in the suggestion\n> diff --git a/git-rebase.sh b/git-rebase.sh\n> index 04f6e44..b89f960 100755\n> --- a/git-rebase.sh\n> +++ b/git-rebase.sh\n> @@ -448,7 +448,7 @@ then\n>                 then\n>                         . git-parse-remote\n>                         error_on_missing_default_upstream \"rebase\" \"rebase\" \\\n> -                               \"against\" \"git rebase $(gettext '<branch>')\"\n> +                               \"git rebase $(gettext '<branch>')\"\n>                 fi\n>\n>                 test \"$fork_point\" = auto && fork_point=t\n> --\n> 2.1.4\n>\n\n[1]: http://public-inbox.org/git/CAFZEwPMGTzVuLMSzm8wiNxvia4AV0T79C1ZTfcuO4=Bydz_zQA@mail.gmail.com/\n[2]: http://public-inbox.org/git/xmqqd1ey8rul.fsf@gitster.mtv.corp.google.com/\n"},{"id":"310846","messageId":"20170204113634.GA27520@ubuntu-512mb-blr1-01.localdomain","threadId":"45047","inReplyTo":"CAFZEwPPyJBD0a+Jkr7EBCurFzvHLvZY9r_SFWS2wyW7QmmP4pg@mail.gmail.com","subject":"Re: [PATCH v2] parse-remote: Remove reference to unused op_prep","fromName":"siddharth","fromEmail":"kannan.siddharth12@gmail.com","sentAt":"2017-02-04T11:36:34Z","receivedAt":"2017-02-04T11:36:43Z","isPatch":true,"sender":{"key":"kannan.siddharth12@gmail.com","avatar":"https://gravatar.com/avatar/f555b34abc9cec49fd7e7ca4a55b58be0e0af0fc58e75b7887210199b7d4ca5a?d=mp&s=160"},"body":"On Sat, Feb 04, 2017 at 04:55:45PM +0530, Pranit Bauva wrote:\n> Hey SIddharth,\n> \n> > Subject: parse-remote: Remove reference to unused op_prep\n>                                          ^\n> \n> Minor nit: after the colon, we generally don't use the word starting\n> with an uppercase letter which I think can be figured out when you run\n> `git log -p git-parse-remote.sh`\n\nOh, I am really sorry to have missed this. I will fix this and send a\nthird version of this patch.\n> \n> On Sat, Feb 4, 2017 at 1:30 PM, Siddharth Kannan\n> <kannan.siddharth12@gmail.com> wrote:\n> > The error_on_missing_default_upstream helper function learned to\n> > take op_prep argument with 15a147e618 (\"rebase: use @{upstream}\n> > if no upstream specified\", 2011-02-09), but as of 045fac5845\n> > (\"i18n: git-parse-remote.sh: mark strings for translation\",\n> >  2016-04-19), the argument is no longer used.  Remove it.\n> >\n> > Signed-off-by: Siddharth Kannan <kannan.siddharth12@gmail.com>\n> > ---\n> > Thanks a lot, Pranit and Junio for your reviews on the first version of this\n> > patch. I have changed the messages accordingly.\n> >\n> >  contrib/examples/git-pull.sh | 2 +-\n> >  git-parse-remote.sh          | 3 +--\n> >  git-rebase.sh                | 2 +-\n> >  3 files changed, 3 insertions(+), 4 deletions(-)\n> >\n> > diff --git a/contrib/examples/git-pull.sh b/contrib/examples/git-pull.sh\n> > index 6b3a03f..1d51dc3 100755\n> > --- a/contrib/examples/git-pull.sh\n> > +++ b/contrib/examples/git-pull.sh\n> > @@ -267,7 +267,7 @@ error_on_no_merge_candidates () {\n> >                 echo \"for your current branch, you must specify a branch on the command line.\"\n> >         elif [ -z \"$curr_branch\" -o -z \"$upstream\" ]; then\n> >                 . git-parse-remote\n> > -               error_on_missing_default_upstream \"pull\" $op_type $op_prep \\\n> > +               error_on_missing_default_upstream \"pull\" $op_type \\\n> >                         \"git pull <remote> <branch>\"\n> >         else\n> >                 echo \"Your configuration specifies to $op_type $op_prep the ref '${upstream#refs/heads/}'\"\n> \n> I guess I suggested you to not change the file in contrib/ in my\n> earlier email[1] and to which Junio agreed too[2]. Is there any\n> confusion?\n\nOh, you want me to completely remove the contrib/examples/ change\nbecause that's the old shell implementation. Got it, I just checked \nthe log for that file and realised that it hasn't been changed \nin a long time.\n\n> \n> > diff --git a/git-parse-remote.sh b/git-parse-remote.sh\n> > index d3c3998..9698a05 100644\n> > --- a/git-parse-remote.sh\n> > +++ b/git-parse-remote.sh\n> > @@ -56,8 +56,7 @@ get_remote_merge_branch () {\n> >  error_on_missing_default_upstream () {\n> >         cmd=\"$1\"\n> >         op_type=\"$2\"\n> > -       op_prep=\"$3\" # FIXME: op_prep is no longer used\n> > -       example=\"$4\"\n> > +       example=\"$3\"\n> >         branch_name=$(git symbolic-ref -q HEAD)\n> >         display_branch_name=\"${branch_name#refs/heads/}\"\n> >         # If there's only one remote, use that in the suggestion\n> > diff --git a/git-rebase.sh b/git-rebase.sh\n> > index 04f6e44..b89f960 100755\n> > --- a/git-rebase.sh\n> > +++ b/git-rebase.sh\n> > @@ -448,7 +448,7 @@ then\n> >                 then\n> >                         . git-parse-remote\n> >                         error_on_missing_default_upstream \"rebase\" \"rebase\" \\\n> > -                               \"against\" \"git rebase $(gettext '<branch>')\"\n> > +                               \"git rebase $(gettext '<branch>')\"\n> >                 fi\n> >\n> >                 test \"$fork_point\" = auto && fork_point=t\n> > --\n> > 2.1.4\n> >\n> \n> [1]: http://public-inbox.org/git/CAFZEwPMGTzVuLMSzm8wiNxvia4AV0T79C1ZTfcuO4=Bydz_zQA@mail.gmail.com/\n> [2]: http://public-inbox.org/git/xmqqd1ey8rul.fsf@gitster.mtv.corp.google.com/\n"}]}