File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1351,4 +1351,22 @@ fn update_precise_git_revisions() {
1351
1351
1352
1352
assert ! ( p. read_lockfile( ) . contains( & tag_commit_id) ) ;
1353
1353
assert ! ( !p. read_lockfile( ) . contains( & head_id) ) ;
1354
+
1355
+ // Now make a tag looks like an oid.
1356
+ // It requires a git fetch, as the oid cannot be found in preexisting git db.
1357
+ let arbitrary_tag: String = std:: iter:: repeat ( 'a' ) . take ( head_id. len ( ) ) . collect ( ) ;
1358
+ git:: tag ( & git_repo, & arbitrary_tag) ;
1359
+
1360
+ p. cargo ( "update git --precise" )
1361
+ . arg ( & arbitrary_tag)
1362
+ . with_stderr ( format ! (
1363
+ "\
1364
+ [UPDATING] git repository `{url}`
1365
+ [UPDATING] git v0.5.0 ([..]) -> #{}" ,
1366
+ & head_id[ ..8 ] ,
1367
+ ) )
1368
+ . run ( ) ;
1369
+
1370
+ assert ! ( p. read_lockfile( ) . contains( & head_id) ) ;
1371
+ assert ! ( !p. read_lockfile( ) . contains( & tag_commit_id) ) ;
1354
1372
}
You can’t perform that action at this time.
0 commit comments