summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2011-07-09 13:44:50 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2011-08-28 21:53:41 -0400
commita3dffca03588e65aff68cfaed62fc10298852b4f (patch)
tree661118b0b7a8cd7cbbb4cbd4b0c283fd81bbca0a
parentd031efd02ae8c145cd5df126da53936fbd450a42 (diff)
downloadgit-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-xgit-bz14
1 files changed, 1 insertions, 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: