* [PATCH v2] parse-remote: Remove reference to unused op_prep
@ 2017-02-04 8:00 Siddharth Kannan
2017-02-04 11:25 ` Pranit Bauva
0 siblings, 1 reply; 3+ messages in thread
From: Siddharth Kannan @ 2017-02-04 8:00 UTC (permalink / raw)
To: git; +Cc: pranit.bauva, Siddharth Kannan
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, Pranit and Junio for your reviews on the first version of this
patch. I have changed the messages accordingly.
contrib/examples/git-pull.sh | 2 +-
git-parse-remote.sh | 3 +--
git-rebase.sh | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/contrib/examples/git-pull.sh b/contrib/examples/git-pull.sh
index 6b3a03f..1d51dc3 100755
--- a/contrib/examples/git-pull.sh
+++ b/contrib/examples/git-pull.sh
@@ -267,7 +267,7 @@ error_on_no_merge_candidates () {
echo "for your current branch, you must specify a branch on the command line."
elif [ -z "$curr_branch" -o -z "$upstream" ]; then
. git-parse-remote
- error_on_missing_default_upstream "pull" $op_type $op_prep \
+ error_on_missing_default_upstream "pull" $op_type \
"git pull <remote> <branch>"
else
echo "Your configuration specifies to $op_type $op_prep the ref '${upstream#refs/heads/}'"
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] parse-remote: Remove reference to unused op_prep
2017-02-04 8:00 [PATCH v2] parse-remote: Remove reference to unused op_prep Siddharth Kannan
@ 2017-02-04 11:25 ` Pranit Bauva
2017-02-04 11:36 ` siddharth
0 siblings, 1 reply; 3+ messages in thread
From: Pranit Bauva @ 2017-02-04 11:25 UTC (permalink / raw)
To: Siddharth Kannan; +Cc: Git List
Hey SIddharth,
> Subject: parse-remote: Remove reference to unused op_prep
^
Minor nit: after the colon, we generally don't use the word starting
with an uppercase letter which I think can be figured out when you run
`git log -p git-parse-remote.sh`
On Sat, Feb 4, 2017 at 1:30 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>
> ---
> Thanks a lot, Pranit and Junio for your reviews on the first version of this
> patch. I have changed the messages accordingly.
>
> contrib/examples/git-pull.sh | 2 +-
> git-parse-remote.sh | 3 +--
> git-rebase.sh | 2 +-
> 3 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/contrib/examples/git-pull.sh b/contrib/examples/git-pull.sh
> index 6b3a03f..1d51dc3 100755
> --- a/contrib/examples/git-pull.sh
> +++ b/contrib/examples/git-pull.sh
> @@ -267,7 +267,7 @@ error_on_no_merge_candidates () {
> echo "for your current branch, you must specify a branch on the command line."
> elif [ -z "$curr_branch" -o -z "$upstream" ]; then
> . git-parse-remote
> - error_on_missing_default_upstream "pull" $op_type $op_prep \
> + error_on_missing_default_upstream "pull" $op_type \
> "git pull <remote> <branch>"
> else
> echo "Your configuration specifies to $op_type $op_prep the ref '${upstream#refs/heads/}'"
I guess I suggested you to not change the file in contrib/ in my
earlier email[1] and to which Junio agreed too[2]. Is there any
confusion?
> 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
>
[1]: http://public-inbox.org/git/CAFZEwPMGTzVuLMSzm8wiNxvia4AV0T79C1ZTfcuO4=Bydz_zQA@mail.gmail.com/
[2]: http://public-inbox.org/git/xmqqd1ey8rul.fsf@gitster.mtv.corp.google.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] parse-remote: Remove reference to unused op_prep
2017-02-04 11:25 ` Pranit Bauva
@ 2017-02-04 11:36 ` siddharth
0 siblings, 0 replies; 3+ messages in thread
From: siddharth @ 2017-02-04 11:36 UTC (permalink / raw)
To: Pranit Bauva; +Cc: Git List
On Sat, Feb 04, 2017 at 04:55:45PM +0530, Pranit Bauva wrote:
> Hey SIddharth,
>
> > Subject: parse-remote: Remove reference to unused op_prep
> ^
>
> Minor nit: after the colon, we generally don't use the word starting
> with an uppercase letter which I think can be figured out when you run
> `git log -p git-parse-remote.sh`
Oh, I am really sorry to have missed this. I will fix this and send a
third version of this patch.
>
> On Sat, Feb 4, 2017 at 1:30 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>
> > ---
> > Thanks a lot, Pranit and Junio for your reviews on the first version of this
> > patch. I have changed the messages accordingly.
> >
> > contrib/examples/git-pull.sh | 2 +-
> > git-parse-remote.sh | 3 +--
> > git-rebase.sh | 2 +-
> > 3 files changed, 3 insertions(+), 4 deletions(-)
> >
> > diff --git a/contrib/examples/git-pull.sh b/contrib/examples/git-pull.sh
> > index 6b3a03f..1d51dc3 100755
> > --- a/contrib/examples/git-pull.sh
> > +++ b/contrib/examples/git-pull.sh
> > @@ -267,7 +267,7 @@ error_on_no_merge_candidates () {
> > echo "for your current branch, you must specify a branch on the command line."
> > elif [ -z "$curr_branch" -o -z "$upstream" ]; then
> > . git-parse-remote
> > - error_on_missing_default_upstream "pull" $op_type $op_prep \
> > + error_on_missing_default_upstream "pull" $op_type \
> > "git pull <remote> <branch>"
> > else
> > echo "Your configuration specifies to $op_type $op_prep the ref '${upstream#refs/heads/}'"
>
> I guess I suggested you to not change the file in contrib/ in my
> earlier email[1] and to which Junio agreed too[2]. Is there any
> confusion?
Oh, you want me to completely remove the contrib/examples/ change
because that's the old shell implementation. Got it, I just checked
the log for that file and realised that it hasn't been changed
in a long time.
>
> > 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
> >
>
> [1]: http://public-inbox.org/git/CAFZEwPMGTzVuLMSzm8wiNxvia4AV0T79C1ZTfcuO4=Bydz_zQA@mail.gmail.com/
> [2]: http://public-inbox.org/git/xmqqd1ey8rul.fsf@gitster.mtv.corp.google.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-04 11:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-04 8:00 [PATCH v2] parse-remote: Remove reference to unused op_prep Siddharth Kannan
2017-02-04 11:25 ` Pranit Bauva
2017-02-04 11:36 ` siddharth
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).