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.