diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-11-20 23:48:52 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-11-20 23:48:52 -0800 |
commit | 376f39fbea0dfb31402abda878a7b0018f6a6161 (patch) | |
tree | d97dd8a947407fc4c36a97ad7b8b37e6b8142e9e /contrib | |
parent | 7a4383cf13819cd2ef00f0d60318aad3f1813117 (diff) | |
parent | a3d023d0a3783612053f2149e784b43befceccad (diff) | |
download | git-376f39fbea0dfb31402abda878a7b0018f6a6161.tar.gz |
Merge branch 'jn/editor-pager'
* jn/editor-pager:
Provide a build time default-pager setting
Provide a build time default-editor setting
am -i, git-svn: use "git var GIT_PAGER"
add -i, send-email, svn, p4, etc: use "git var GIT_EDITOR"
Teach git var about GIT_PAGER
Teach git var about GIT_EDITOR
Suppress warnings from "git var -l"
Do not use VISUAL editor on dumb terminals
Handle more shell metacharacters in editor names
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/fast-import/git-p4 | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index e710219ca5..48059d0aa7 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -729,13 +729,10 @@ class P4Submit(Command): tmpFile.write(submitTemplate + separatorLine + diff + newdiff) tmpFile.close() mtime = os.stat(fileName).st_mtime - defaultEditor = "vi" - if platform.system() == "Windows": - defaultEditor = "notepad" if os.environ.has_key("P4EDITOR"): editor = os.environ.get("P4EDITOR") else: - editor = os.environ.get("EDITOR", defaultEditor); + editor = read_pipe("git var GIT_EDITOR") system(editor + " " + fileName) response = "y" |