File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,6 @@ impl<'a> Needle<'a> {
104
104
return Match :: None ;
105
105
}
106
106
let end = item. full_ref_name . len ( ) - tail. len ( ) ;
107
- let end = item. full_ref_name [ * asterisk_pos..end] . find_byte ( b'/' ) . unwrap_or ( end) ;
108
107
Match :: GlobRange ( * asterisk_pos..end)
109
108
}
110
109
Needle :: Object ( id) => {
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ mkdir base
29
29
git checkout -b f3 main
30
30
git commit -m " f3" --allow-empty
31
31
git tag v0.0-f3
32
+
33
+ git checkout -b sub/f4 main
34
+ git checkout -b sub/subdir/f5 main
35
+ git checkout -b suub/f6 main
32
36
)
33
37
34
38
git clone --shared ./base clone
@@ -51,6 +55,7 @@ git clone --shared ./base clone
51
55
baseline " +refs/heads/*:refs/remotes/origin/*"
52
56
baseline " refs/heads/*1:refs/remotes/origin/*1"
53
57
baseline " refs/heads/f*:refs/remotes/origin/a*"
58
+ baseline " refs/heads/*/f6:refs/remotes/origin/*/f6"
54
59
baseline " main" " f1"
55
60
baseline " heads/main" " heads/f1"
56
61
baseline " refs/heads/main" " refs/heads/f1"
Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ pub mod baseline {
290
290
}
291
291
292
292
fn full_remote_ref ( mut name : BString ) -> BString {
293
- if !name. contains ( & b'/' ) {
293
+ if !name. contains ( & b'/' ) || name . starts_with ( b"sub/" ) || name . starts_with ( b"suub/" ) {
294
294
if looks_like_tag ( & name) {
295
295
name. insert_str ( 0 , b"refs/tags/" ) ;
296
296
} else if let Ok ( _id) = git_hash:: ObjectId :: from_hex ( name. as_ref ( ) ) {
You can’t perform that action at this time.
0 commit comments