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()
493493 }
494494 }
495495
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+
496510 [ Fact ]
497511 public void LookingUpAGitLinkThrows ( )
498512 {
You can’t perform that action at this time.
0 commit comments