Skip to content

Commit 340cfd8

Browse files
committed
Refspec: implement wildcard matching
References libgit2#211
1 parent 2271b00 commit 340cfd8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

LibGit2Sharp/Refspec.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public bool Matches(string str)
3535
if (!wildcard)
3636
return Src.Equals(str);
3737

38-
return false;
38+
var prefix = Src.Remove(Src.Length - 1);
39+
return str.StartsWith(prefix);
3940
}
4041
}
4142
}

0 commit comments

Comments
 (0)