diff options
Diffstat (limited to 'git_crecord/crecord_core.py')
-rw-r--r-- | git_crecord/crecord_core.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/git_crecord/crecord_core.py b/git_crecord/crecord_core.py index 38a7191..f8e01d4 100644 --- a/git_crecord/crecord_core.py +++ b/git_crecord/crecord_core.py @@ -37,15 +37,18 @@ def dorecord(ui, repo, commitfunc, *pats, **opts): In the end we'll record interesting changes, and everything else will be left in place, so the user can continue his work. - Disable `core.quotePath` to support non-ASCII filenames. - By default (with `core.quotePath=true`) `git diff` only shows filename characters printable in ASCII, - and the presence of any character higher than U+007F will cause `git diff`'s output to double-quote - the filename and replace the non-ASCII characters in that filename with their octal representations. - The double-quoting (i.e. `diff --git "a/` instead of `diff --git a/`) breaks `crecord`'s stdout parsing. - https://git-scm.com/docs/git-config#Documentation/git-config.txt-corequotePath + We pass additional configuration options to Git to make the diff output + consistent: + - core.quotePath: + Limit symbols requiring escaping to double-quotes, backslash and + control characters. + - diff.mnemonicPrefix: + If set, git diff uses a prefix pair that is different from the standard + "a/" and "b/" depending on what is being compared. Our parser only + supports "a/" and "b/". """ - git_args = ["git", "-c", "core.quotepath=false", "-c", "diff.mnemonicprefix=false", "diff", "--binary"] + git_args = ["git", "-c", "core.quotePath=false", "-c", "diff.mnemonicPrefix=false", "diff", "--binary"] git_base = [] if opts['cached']: |