diff options
author | Dan Winship <danw@gnome.org> | 2011-07-09 13:44:50 -0400 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2011-08-28 21:53:41 -0400 |
commit | a3dffca03588e65aff68cfaed62fc10298852b4f (patch) | |
tree | 661118b0b7a8cd7cbbb4cbd4b0c283fd81bbca0a | |
parent | d031efd02ae8c145cd5df126da53936fbd450a42 (diff) | |
download | git-bz-a3dffca03588e65aff68cfaed62fc10298852b4f.tar.gz |
Fix choice of editor
git prefers $VISUAL to $EDITOR. Most of the time. Fortunately we can
just ask git what editor to use rather than trying to figure it out
ourselves.
https://bugzilla.gnome.org/show_bug.cgi?id=654396
-rwxr-xr-x | git-bz | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -708,19 +708,7 @@ def make_filename(description): return filename def edit_file(filename): - editor = None - if 'GIT_EDITOR' in os.environ: - editor = os.environ['GIT_EDITOR'] - if editor == None: - try: - editor = git.config('core.editor', get=True) - except CalledProcessError: - pass - if editor == None and 'EDITOR' in os.environ: - editor = os.environ['EDITOR'] - if editor == None: - editor = "vi" - + editor = git.var("GIT_EDITOR") process = Popen(editor + " " + filename, shell=True) process.wait() if process.returncode != 0: |