File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -493,6 +493,20 @@ public void LookingUpWithATooShortShaThrows()
493
493
<
8000
code class="diff-text syntax-highlighted-line"> }
494
494
}
495
495
496
+ [ Fact ]
497
+ public void LookingUpByAWrongRevParseExpressionThrows ( )
498
+ {
499
+ string path = SandboxBareTestRepo ( ) ;
500
+ using ( var repo = new Repository ( path ) )
501
+ {
502
+ Assert . Throws < InvalidSpecificationException > ( ( ) => repo . Lookup ( "tags/point_to_blob^{tree}" ) ) ;
503
+ Assert . Throws < InvalidSpecificationException > ( ( ) => repo . Lookup ( "tags/point_to_blob^{commit}" ) ) ;
504
+ Assert . Throws < InvalidSpecificationException > ( ( ) => repo . Lookup < Commit > ( "tags/point_to_blob^{commit}" ) ) ;
505
+ Assert . Throws < InvalidSpecificationException > ( ( ) => repo . Lookup ( "master^{tree}^{blob}" ) ) ;
506
+ Assert . Throws < InvalidSpecificationException > ( ( ) => repo . Lookup < Blob > ( "master^{blob}" ) ) ;
507
+ }
508
+ }
509
+
496
510
[ Fact ]
497
511
public void LookingUpAGitLinkThrows ( )
498
512
{
You can’t perform that action at this time.
0 commit comments