File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -1254,6 +1254,34 @@ fn issue_13695_allowing_dirty_vcs_info_but_clean() {
1254
1254
) ;
1255
1255
}
1256
1256
1257
+ #[ cargo_test]
1258
+ fn issue_14354_allowing_dirty_bare_commit ( ) {
1259
+ let p = project ( ) . build ( ) ;
1260
+ // Init a bare commit git repo
1261
+ let _ = git:: repo ( & paths:: root ( ) . join ( "foo" ) )
1262
+ . file (
1263
+ "Cargo.toml" ,
1264
+ r#"
1265
+ [package]
1266
+ name = "foo"
1267
+ version = "0.1.0"
1268
+ edition = "2015"
1269
+ description = "foo"
1270
+ license = "foo"
1271
+ documentation = "foo"
1272
+ "# ,
1273
+ )
1274
+ . file ( "src/lib.rs" , "" ) ;
1275
+
1276
+ p. cargo ( "package --allow-dirty" )
1277
+ . with_status ( 101 )
1278
+ . with_stderr_data ( str![ [ r#"
1279
+ [ERROR] revspec 'HEAD' not found; class=Reference (4); code=NotFound (-3)
1280
+
1281
+ "# ] ] )
1282
+ . run ( ) ;
1283
+ }
1284
+
1257
1285
#[ cargo_test]
1258
1286
fn generated_manifest ( ) {
1259
1287
let registry = registry:: alt_init ( ) ;
You can’t perform that action at this time.
0 commit comments