From a3dffca03588e65aff68cfaed62fc10298852b4f Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Sat, 9 Jul 2011 13:44:50 -0400 Subject: 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 --- git-bz | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/git-bz b/git-bz index 27c4dda..138bf68 100755 --- a/git-bz +++ b/git-bz @@ -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: -- cgit v1.2.3