summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-02-15 14:39:40 +0100
committerPádraig Brady <P@draigBrady.com>2013-02-18 01:28:49 +0000
commit5bff307bdbee76adad7a7990cc23d8fd43b76252 (patch)
tree3b13d8fb995c418846a71305d8aa097ad2707b58 /tests
parentbf7b0e0358bc79141abdd4d974270fbc6bfcba27 (diff)
downloadcoreutils-5bff307bdbee76adad7a7990cc23d8fd43b76252.tar.xz
maint: choose editor in the commit-msg git hook the same way git does
Git honours the GIT_EDITOR environment variable, the "core.editor" Git configuration variable, and the EDITOR environment variable (in that order, and defaulting to "vi" if none of them is set) to decide which editor should be invoked for the user when he has to or want to edit his commit message. However, our commit-msg hook, when invoking an editor on behalf of the user to allow him to fix a non-policy-complaint commit message, only honoured the EDITOR environment variable. To avoid potential annoying inconsistencies, we should really use the same logic used by Git in the selection of the editor. Luckily, we don't have to duplicate this logic (that would be brittle in the long term), as we can rely on the "git var" command, designed exactly to be used in situations like this. * scripts/git-hooks ($editor): Adjust definition.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions