Skip to content

Instantly share code, notes, and snippets.

@pscheit
Created June 17, 2013 08:17
Show Gist options
  • Save pscheit/5795394 to your computer and use it in GitHub Desktop.
Save pscheit/5795394 to your computer and use it in GitHub Desktop.
sample windows patch with backslash paths
diff --git "a/C:\\Users\\PHILIP~1\\AppData\\Local\\Temp\\TortoiseGit\\Fil37B7.tmp\\File-21c8cf5-left.php" "b/D:\\www\\php-refactoring-browser\\src\\main\\QafooLabs\\Refactoring\\Domain\\Model\\File.php"
index d63e258..52ff6ca 100644
--- "a/C:\\Users\\PHILIP~1\\AppData\\Local\\Temp\\TortoiseGit\\Fil37B7.tmp\\File-21c8cf5-left.php"
+++ "b/D:\\www\\php-refactoring-browser\\src\\main\\QafooLabs\\Refactoring\\Domain\\Model\\File.php"
@@ -35,7 +35,7 @@ class File
}
$code = file_get_contents($path);
- $relativePath = ltrim(str_replace($workingDirectory, "", $path), "/");
+ $relativePath = ltrim(str_replace($workingDirectory, "", $path), "/\\");
return new self($relativePath, $code);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment