Skip to content

Commit e075dba

Browse files
peffdscho
authored andcommitted
fast-import: stop creating leading directories for import-marks
When asked to import marks from "subdir/file.marks", we create the leading directory "subdir" if it doesn't exist. This makes no sense for importing marks, where we only ever open the path for reading. Most of the time this would be a noop, since if the marks file exists, then the leading directories exist, too. But if it doesn't (e.g., because --import-marks-if-exists was used), then we'd create the useless directory. This dates back to 580d5f8 (fast-import: always create marks_file directories, 2010-03-29). Even then it was useless, so it seems to have been added in error alongside the --export-marks case (which _is_ helpful). Signed-off-by: Jeff King <[email protected]>
1 parent 11e934d commit e075dba

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

fast-import.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3228,7 +3228,6 @@ static void option_import_marks(const char *marks,
32283228
}
32293229

32303230
import_marks_file = make_fast_import_path(marks);
3231-
safe_create_leading_directories_const(import_marks_file);
32323231
import_marks_file_from_stream = from_stream;
32333232
import_marks_file_ignore_missing = ignore_missing;
32343233
}

0 commit comments

Comments
 (0)