git-log-utils
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -0,1 +1,7 @@ | ||
## [0.2.1](https://github.com/littlebee/git-log-utils.git/compare/0.2.0...0.2.1) (2016-03-89) | ||
### Other Commits | ||
* [c7dc6eb](https://github.com/littlebee/git-log-utils.git/commit/c7dc6eb469ebca55124ad7f12c696a130d6fe76d) fixes git-time-machine:issue#30. should handle spaces in directory and file names and properly escape and normalize file for windows | ||
## [0.2.0](https://github.com/littlebee/git-log-utils.git/compare/0.1.6...0.2.0) (2016-03-87) | ||
@@ -2,0 +8,0 @@ Thank you @Faleij the critical windows fix. Did I ever tell you, you're my hero. :) |
@@ -52,5 +52,6 @@ // Generated by CoffeeScript 1.9.3 | ||
} else { | ||
directory = Path.normalize(Path.dirname(fileName)); | ||
directory = Path.dirname(fileName); | ||
} | ||
cmd = "cd " + directory + " && git log" + flags + " " + fileName; | ||
fileName = Path.normalize(this._escapeSpacesInPath(fileName)); | ||
cmd = "git log" + flags + " " + fileName; | ||
if (process.env.DEBUG === '1') { | ||
@@ -60,3 +61,4 @@ console.log('$ ' + cmd); | ||
return ChildProcess.execSync(cmd, { | ||
stdio: 'pipe' | ||
stdio: 'pipe', | ||
cwd: directory | ||
}).toString(); | ||
@@ -106,2 +108,14 @@ }; | ||
/* | ||
See nodejs Path.normalize(). This method extends Path.normalize() to add: | ||
- escape of space characters | ||
*/ | ||
GitLogUtils._escapeSpacesInPath = function(filePath) { | ||
var spaceReplacement; | ||
spaceReplacement = process.platform === 'win32' ? '^ ' : '\\ '; | ||
return filePath.replace(/ /g, spaceReplacement); | ||
}; | ||
return GitLogUtils; | ||
@@ -108,0 +122,0 @@ |
{ | ||
"name": "git-log-utils", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Utility methods for parsing git log output", | ||
@@ -5,0 +5,0 @@ "main": "lib/git-log-utils.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
425459
2264