diff --git a/GitUpKit/Core/GCIndex.m b/GitUpKit/Core/GCIndex.m index 96db7ca0..a49431bd 100644 --- a/GitUpKit/Core/GCIndex.m +++ b/GitUpKit/Core/GCIndex.m @@ -541,12 +541,12 @@ - (BOOL)checkoutFilesToWorkingDirectory:(NSArray*)paths fromIndex:(GC } git_checkout_options options = GIT_CHECKOUT_OPTIONS_INIT; - options.checkout_strategy = GIT_CHECKOUT_FORCE | GIT_CHECKOUT_DONT_UPDATE_INDEX; // There's no reason to update the index + options.checkout_strategy = GIT_CHECKOUT_FORCE | GIT_CHECKOUT_DONT_UPDATE_INDEX | GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH; // There's no reason to update the index options.paths.count = paths.count; char** pathStrings = malloc(paths.count * sizeof(char*)); options.paths.strings = pathStrings; for (NSUInteger i = 0; i < paths.count; i++) { - const char* filePath = GCGitPathFromFileSystemPath([NSRegularExpression escapedPatternForString:paths[i]]); + const char* filePath = GCGitPathFromFileSystemPath(paths[i]); options.paths.strings[i] = (char*)filePath; }