# [PATCH v3] parse-remote: remove reference to unused op_prep

4 messages from 2017-02-04 to 2017-02-06. Participants: Siddharth Kannan, Pranit Bauva, Junio C Hamano.
Thread: https://gitlist.dev/t/45048

## Siddharth Kannan, 2017-02-04 14:31

Subject: [PATCH v3] parse-remote: remove reference to unused op_prep
Message-ID: <1486218663-31820-1-git-send-email-kannan.siddharth12@gmail.com>
URL: https://gitlist.dev/e/1486218663-31820-1-git-send-email-kannan.siddharth12%40gmail.com

```
The error_on_missing_default_upstream helper function learned to
take op_prep argument with 15a147e618 ("rebase: use @{upstream}
if no upstream specified", 2011-02-09), but as of 045fac5845
("i18n: git-parse-remote.sh: mark strings for translation",
 2016-04-19), the argument is no longer used.  Remove it.

Signed-off-by: Siddharth Kannan <kannan.siddharth12@gmail.com>
---
Thanks a lot for the review, Pranit and Junio! I have made the appropriate
changes, and the edit to the file inside contrib/examples/ has been removed from
this patch.

 git-parse-remote.sh | 3 +--
 git-rebase.sh       | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index d3c3998..9698a05 100644
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
@@ -56,8 +56,7 @@ get_remote_merge_branch () {
 error_on_missing_default_upstream () {
 	cmd="$1"
 	op_type="$2"
-	op_prep="$3" # FIXME: op_prep is no longer used
-	example="$4"
+	example="$3"
 	branch_name=$(git symbolic-ref -q HEAD)
 	display_branch_name="${branch_name#refs/heads/}"
 	# If there's only one remote, use that in the suggestion
diff --git a/git-rebase.sh b/git-rebase.sh
index 04f6e44..b89f960 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -448,7 +448,7 @@ then
 		then
 			. git-parse-remote
 			error_on_missing_default_upstream "rebase" "rebase" \
-				"against" "git rebase $(gettext '<branch>')"
+				"git rebase $(gettext '<branch>')"
 		fi
 
 		test "$fork_point" = auto && fork_point=t
-- 
2.1.4


```

## Pranit Bauva, 2017-02-04 21:15

Subject: Re: [PATCH v3] parse-remote: remove reference to unused op_prep
Message-ID: <CAFZEwPOdL4mOAnmTUqs5LmfdG2GQCieVGVQ7T3ZWR0n+d6tCQQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAFZEwPOdL4mOAnmTUqs5LmfdG2GQCieVGVQ7T3ZWR0n%2Bd6tCQQ%40mail.gmail.com
In-Reply-To: <1486218663-31820-1-git-send-email-kannan.siddharth12@gmail.com>

```
Hey Siddharth,

On Sat, Feb 4, 2017 at 8:01 PM, Siddharth Kannan
<kannan.siddharth12@gmail.com> wrote:
> The error_on_missing_default_upstream helper function learned to
> take op_prep argument with 15a147e618 ("rebase: use @{upstream}
> if no upstream specified", 2011-02-09), but as of 045fac5845
> ("i18n: git-parse-remote.sh: mark strings for translation",
>  2016-04-19), the argument is no longer used.  Remove it.
>
> Signed-off-by: Siddharth Kannan <kannan.siddharth12@gmail.com>

This looks good to me! Thanks :)

Regards,
Pranit Bauva

```

## Siddharth Kannan, 2017-02-06 02:28

Subject: Re: [PATCH v3] parse-remote: remove reference to unused op_prep
Message-ID: <20170206022804.GB3323@ubuntu-512mb-blr1-01.localdomain>
URL: https://gitlist.dev/e/20170206022804.GB3323%40ubuntu-512mb-blr1-01.localdomain
In-Reply-To: <CAFZEwPOdL4mOAnmTUqs5LmfdG2GQCieVGVQ7T3ZWR0n+d6tCQQ@mail.gmail.com>

```
Hey Pranit,
On Sun, Feb 05, 2017 at 02:45:46AM +0530, Pranit Bauva wrote:
> Hey Siddharth,
> 
> On Sat, Feb 4, 2017 at 8:01 PM, Siddharth Kannan
> <kannan.siddharth12@gmail.com> wrote:
> > The error_on_missing_default_upstream helper function learned to
> > take op_prep argument with 15a147e618 ("rebase: use @{upstream}
> > if no upstream specified", 2011-02-09), but as of 045fac5845
> > ("i18n: git-parse-remote.sh: mark strings for translation",
> >  2016-04-19), the argument is no longer used.  Remove it.
> >
> > Signed-off-by: Siddharth Kannan <kannan.siddharth12@gmail.com>
> 
> This looks good to me! Thanks :)
> 
> Regards,
> Pranit Bauva

Should I send this patch with "To:" set to Junio and "Cc:" set to the
mailing list, as mentioend in the SubmittingPatches document?

- Siddharth Kannan

```

## Junio C Hamano, 2017-02-06 18:17

Subject: Re: [PATCH v3] parse-remote: remove reference to unused op_prep
Message-ID: <xmqqefzb2ngd.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqefzb2ngd.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <20170206022804.GB3323@ubuntu-512mb-blr1-01.localdomain>

```
Siddharth Kannan <kannan.siddharth12@gmail.com> writes:

> Hey Pranit,
> On Sun, Feb 05, 2017 at 02:45:46AM +0530, Pranit Bauva wrote:
>> Hey Siddharth,
>> 
>> On Sat, Feb 4, 2017 at 8:01 PM, Siddharth Kannan
>> <kannan.siddharth12@gmail.com> wrote:
>> > The error_on_missing_default_upstream helper function learned to
>> > take op_prep argument with 15a147e618 ("rebase: use @{upstream}
>> > if no upstream specified", 2011-02-09), but as of 045fac5845
>> > ("i18n: git-parse-remote.sh: mark strings for translation",
>> >  2016-04-19), the argument is no longer used.  Remove it.
>> >
>> > Signed-off-by: Siddharth Kannan <kannan.siddharth12@gmail.com>
>> 
>> This looks good to me! Thanks :)
>> 
>> Regards,
>> Pranit Bauva
>
> Should I send this patch with "To:" set to Junio and "Cc:" set to the
> mailing list, as mentioend in the SubmittingPatches document?

Nah, I was watching the discussion from the sideline.  I'll pick it
up after doing one final read on the patch myself.

Thanks, both.

```
