We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c07173f + ae454f6 commit 89bf013Copy full SHA for 89bf013
t/t2019-checkout-ambiguous-ref.sh
@@ -56,4 +56,30 @@ test_expect_success VAGUENESS_SUCCESS 'checkout reports switch to branch' '
56
test_i18ngrep ! "^HEAD is now at" stderr
57
'
58
59
+test_expect_success 'wildcard ambiguation, paths win' '
60
+ git init ambi &&
61
+ (
62
+ cd ambi &&
63
+ echo a >a.c &&
64
+ git add a.c &&
65
+ echo b >a.c &&
66
+ git checkout "*.c" &&
67
+ echo a >expect &&
68
+ test_cmp expect a.c
69
+ )
70
+'
71
+
72
+test_expect_success 'wildcard ambiguation, refs lose' '
73
+ git init ambi2 &&
74
75
+ cd ambi2 &&
76
+ echo a >"*.c" &&
77
+ git add . &&
78
+ test_must_fail git show :"*.c" &&
79
+ git show :"*.c" -- >actual &&
80
81
+ test_cmp expect actual
82
83
84
85
test_done
0 commit comments