From: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
To: Derrick Stolee <stolee@gmail.com>,
Alexandr Miloslavskiy via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 2/2] checkout: die() on ambiguous tracking branches
Date: Wed, 27 Nov 2019 17:42:58 +0100 [thread overview]
Message-ID: <94480425-1827-48d6-b7d7-966acc536c6c@syntevo.com> (raw)
In-Reply-To: <b6963515-1f28-74ab-42bc-a14a07856118@gmail.com>
On 27.11.2019 15:46, Derrick Stolee wrote:
>> + if (!remote && (num_matches > 1)) {
>
> I believe the parentheses around "num_matched > 1" are not needed here.
Fixed in v2.
> I like that you added a test for this non-obvious situation. One thing that
> would help ensure that your test is checking the right thing is to redirect
> stderr to a file and grep for the die() message you included. Something like:
>
> test_must_fail git checkout ambiguous_branch_and_file 2>err &&
> test_i18ngrep "matched multiple (2) remote tracking branches" err &&
This is a good idea, thanks! Added in v2.
next prev parent reply other threads:[~2019-11-27 16:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-27 9:48 [PATCH 0/2] checkout: die() on ambiguous tracking branches Alexandr Miloslavskiy via GitGitGadget
2019-11-27 9:48 ` [PATCH 1/2] parse_branchname_arg(): extract part as new function Alexandr Miloslavskiy via GitGitGadget
2019-11-27 9:48 ` [PATCH 2/2] checkout: die() on ambiguous tracking branches Alexandr Miloslavskiy via GitGitGadget
2019-11-27 14:46 ` Derrick Stolee
2019-11-27 16:42 ` Alexandr Miloslavskiy [this message]
2019-11-27 15:43 ` Ævar Arnfjörð Bjarmason
2019-11-27 16:09 ` Alexandr Miloslavskiy
2019-12-05 15:34 ` Alexandr Miloslavskiy
2019-11-27 16:43 ` [PATCH v2 0/2] " Alexandr Miloslavskiy via GitGitGadget
2019-11-27 16:43 ` [PATCH v2 1/2] parse_branchname_arg(): extract part as new function Alexandr Miloslavskiy via GitGitGadget
2019-11-27 16:43 ` [PATCH v2 2/2] checkout: die() on ambiguous tracking branches Alexandr Miloslavskiy via GitGitGadget
2019-12-01 15:47 ` [PATCH v2 0/2] " Junio C Hamano
2019-12-01 16:52 ` Alexandr Miloslavskiy
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=94480425-1827-48d6-b7d7-966acc536c6c@syntevo.com \
--to=alexandr.miloslavskiy@syntevo.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=stolee@gmail.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.
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).