From: Johannes Schindelin <johannes.schindelin@gmx.de>
To: Paul Tan <pyokagan@gmail.com>
Cc: git@vger.kernel.org, Stefan Beller <sbeller@google.com>
Subject: Re: [PATCH 1/2] pull: handle git-fetch's options as well
Date: Mon, 18 May 2015 16:37:17 +0200 [thread overview]
Message-ID: <1a102d8dabff79207c0d7e3bf434bd6f@www.dscho.org> (raw)
In-Reply-To: <1431955855-16228-1-git-send-email-pyokagan@gmail.com>
Hi Paul,
On 2015-05-18 15:30, Paul Tan wrote:
> t5520: failing test for pull --all with no configured upstream
> t5521: test pull --all --dry-run does not make any changes
>
> error_on_no_merge_candidates() does not consider the case where "$#"
> includes command-line flags that are passed to git-fetch.
>
> As such, when the current branch has no configured upstream, and there
> are no merge candidates because of that, git-pull --all erroneously reports
> that we are pulling from "--all", as it believes that the first argument
> is the remote name.
>
> Add a failing test that shows this case.
>
> Signed-off-by: Paul Tan <pyokagan@gmail.com>
> ---
> git-pull.sh | 34 ++++++++++++++++++++++++++++++++--
> t/t5520-pull.sh | 20 ++++++++++++++++++++
> t/t5521-pull-options.sh | 14 ++++++++++++++
> 3 files changed, 66 insertions(+), 2 deletions(-)
>
> diff --git a/git-pull.sh b/git-pull.sh
> index 9ed01fd..28d49ab 100755
> --- a/git-pull.sh
> +++ b/git-pull.sh
> @@ -163,11 +163,39 @@ do
> --d|--dr|--dry|--dry-|--dry-r|--dry-ru|--dry-run)
> dry_run=--dry-run
> ;;
> + --all|--no-all)
> + all=$1 ;;
I *think* you also want to add a corresponding "all=" line just below the "dry_run=" line, to ensure that "all=blablabla git pull" does not interfere with this command-line setting.
The patch looks fine to me, otherwise.
Ciao,
Dscho
next prev parent reply other threads:[~2015-05-18 14:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-18 13:30 [PATCH 1/2] pull: handle git-fetch's options as well Paul Tan
2015-05-18 13:30 ` [PATCH 2/2] work in progress Paul Tan
2015-05-18 14:05 ` [PATCH 1/2] pull: handle git-fetch's options as well Paul Tan
2015-05-18 14:37 ` Johannes Schindelin [this message]
2015-05-21 8:29 ` Paul Tan
2015-05-21 8:29 ` Paul Tan
-- strict thread matches above, loose matches on Subject: below --
2015-05-18 13:54 [PATCH 0/2] Improve git-pull's option parsing Paul Tan
2015-05-18 13:54 ` [PATCH 1/2] pull: handle git-fetch's options as well Paul Tan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1a102d8dabff79207c0d7e3bf434bd6f@www.dscho.org \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=pyokagan@gmail.com \
--cc=sbeller@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).