[PATCH v2 2/5] notes: use GIT_EDITOR and core.editor over VISUAL/EDITOR
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Feb 14, 2009, 20:23 UTC
- Message-ID
- <69c813ea5c4a3c3f43e729bd59a4064f74e72d66.1234642638.git.trast@student.ethz.ch>
- In-Reply-To
- <200902142056.42198.trast@student.ethz.ch>
This is the order documented in git-config(1), so we should stick to it.
Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> ---
Same as v1.
git-notes.sh | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-notes.sh b/git-notes.sh index 246df65..6859470 100755 --- a/git-notes.sh +++ b/git-notes.sh @@ -35,7 +35,8 @@ edit) git cat-file blob :$COMMIT >> "$MESSAGE" 2> /dev/null fi - ${VISUAL:-${EDITOR:-vi}} "$MESSAGE" + core_editor="$(git config core.editor)" + ${GIT_EDITOR:-${core_editor:-${VISUAL:-${EDITOR:-vi}}}} "$MESSAGE" grep -v ^# < "$MESSAGE" | git stripspace > "$MESSAGE".processed mv "$MESSAGE".processed "$MESSAGE"
-- 1.6.2.rc0.296.ge2122