]> git.ipfire.org Git - thirdparty/git.git/commit
var: allow GIT_EDITOR to return null
authorSean Allred <allred.sean@gmail.com>
Sat, 26 Nov 2022 14:17:57 +0000 (14:17 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 27 Nov 2022 00:35:55 +0000 (09:35 +0900)
commit2ad150e35e52705a97f18bee08f34e00a6557d6f
tree13cd02c9a94b50ce51d1cccb3aba97b4bdc79f72
parent26b8abc7b14754d32d994f87a45b303873565853
var: allow GIT_EDITOR to return null

The handling to die early when there is no EDITOR is valuable when
used in normal code (i.e., editor.c). In git-var, where
null/empty-string is a perfectly valid value to return, it doesn't
make as much sense.

Remove this handling from `git var GIT_EDITOR` so that it does not
fail so noisily when there is no defined editor.

Signed-off-by: Sean Allred <allred.sean@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/var.c
t/t0007-git-var.sh