Showing the changes to git-worktree/src (1 of 1 file). Show all
Unified · Split
| @@ -163,7 +163,16 @@ impl Cache { · 162 unmodified lines | |||
| 163 | test_mkdir_calls, | 163 | test_mkdir_calls, |
| 164 | unlink_on_collision, | 164 | unlink_on_collision, |
| 165 | attribute_globals: _, | 165 | attribute_globals: _, |
| 166 | } => create_leading_directory(components, stack, mode, test_mkdir_calls, *unlink_on_collision)?, | 166 | } => { |
| 167 | #[cfg(debug_assertions)] | ||
| 168 | { | ||
| 169 | create_leading_directory(components, stack, mode, test_mkdir_calls, *unlink_on_collision)? | ||
| 170 | } | ||
| 171 | #[cfg(not(debug_assertions))] | ||
| 172 | { | ||
| 173 | create_leading_directory(components, stack, mode, *unlink_on_collision)? | ||
| 174 | } | ||
| 175 | } | ||
| 167 | State::ProvideAttributesAndIgnore { .. } => todo!(), | 176 | State::ProvideAttributesAndIgnore { .. } => todo!(), |
| 168 | State::ProvideIgnore { .. } => todo!(), | 177 | State::ProvideIgnore { .. } => todo!(), |
| 169 | } | 178 | } |
| @@ -179,7 +188,7 @@ fn create_leading_directory( · 9 unmodified lines | |||
| 179 | components: &mut std::iter::Peekable<std::path::Components<'_>>, | 188 | components: &mut std::iter::Peekable<std::path::Components<'_>>, |
| 180 | stack: &Stack, | 189 | stack: &Stack, |
| 181 | mode: git_index::entry::Mode, | 190 | mode: git_index::entry::Mode, |
| 182 | mkdir_calls: &mut usize, | 191 | #[cfg(debug_assertions)] mkdir_calls: &mut usize, |
| 183 | unlink_on_collision: bool, | 192 | unlink_on_collision: bool, |
| 184 | ) -> std::io::Result<()> { | 193 | ) -> std::io::Result<()> { |
| 185 | let target_is_dir = mode == git_index::entry::Mode::COMMIT || mode == git_index::entry::Mode::DIR; | 194 | let target_is_dir = mode == git_index::entry::Mode::COMMIT || mode == git_index::entry::Mode::DIR; |