File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,6 @@ impl Stack {
63
63
relative. is_relative( ) ,
64
64
"only index paths are handled correctly here, must be relative"
65
65
) ;
66
- debug_assert ! ( !relative. to_string_lossy( ) . is_empty( ) , "empty paths are not allowed" ) ;
67
66
68
67
if self . valid_components == 0 {
69
68
delegate. push_directory ( self ) ?;
Original file line number Diff line number Diff line change @@ -141,5 +141,16 @@ fn delegate_calls_are_consistent() -> crate::Result {
141
141
"the stack is state so keeps thinking it's a directory which is consistent. Git does it differently though."
142
142
) ;
143
143
144
+ s. make_relative_path_current ( "" . as_ref ( ) , & mut r) ?;
145
+ assert_eq ! (
146
+ r,
147
+ Record {
148
+ push_dir: 9 ,
149
+ dirs: vec![ "." . into( ) ] ,
150
+ push: 14 ,
151
+ } ,
152
+ "empty-paths reset the tree effectively"
153
+ ) ;
154
+
144
155
Ok ( ( ) )
145
156
}
You can’t perform that action at this time.
0 commit comments