diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-06-05 12:17:38 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-06-05 12:17:38 -0700 |
commit | 9fb0a798a74509ddc17f7ba7390abce5981c20de (patch) | |
tree | b6f7597e7f47939c0189f593bbd27018655a094c /git-p4.py | |
parent | 5455ee0573a22bb793a7083d593ae1ace909cd4c (diff) | |
parent | f3b5b07c3c7a8494d78e975d689b6c4479e6b0f3 (diff) | |
download | git-9fb0a798a74509ddc17f7ba7390abce5981c20de.tar.gz |
Merge branch 'ld/p4-editor-multi-words'
Unlike "$EDITOR" and "$GIT_EDITOR" that can hold the path to the
command and initial options (e.g. "/path/to/emacs -nw"), 'git p4'
did not let the shell interpolate the contents of the environment
variable that name the editor "$P4EDITOR" (and "$EDITOR", too).
Make it in line with the rest of Git, as well as with Perforce.
* ld/p4-editor-multi-words:
git-p4: tests: use test-chmtime in place of touch
git-p4: fix handling of multi-word P4EDITOR
git-p4: add failing test for P4EDITOR handling
Diffstat (limited to 'git-p4.py')
-rwxr-xr-x | git-p4.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1248,7 +1248,7 @@ class P4Submit(Command, P4UserMap): editor = os.environ.get("P4EDITOR") else: editor = read_pipe("git var GIT_EDITOR").strip() - system([editor, template_file]) + system(["sh", "-c", ('%s "$@"' % editor), editor, template_file]) # If the file was not saved, prompt to see if this patch should # be skipped. But skip this verification step if configured so. |