diff options
author | Sean Allred <allred.sean@gmail.com> | 2022-11-26 17:17:57 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-11-27 03:35:55 +0300 |
commit | 2ad150e35e52705a97f18bee08f34e00a6557d6f (patch) | |
tree | 13cd02c9a94b50ce51d1cccb3aba97b4bdc79f72 /builtin/var.c | |
parent | 26b8abc7b14754d32d994f87a45b303873565853 (diff) |
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>
Diffstat (limited to 'builtin/var.c')
-rw-r--r-- | builtin/var.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/builtin/var.c b/builtin/var.c index 5cbe32ec89..a1a2522126 100644 --- a/builtin/var.c +++ b/builtin/var.c @@ -11,12 +11,7 @@ static const char var_usage[] = "git var (-l | <variable>)"; static const char *editor(int flag) { - const char *pgm = git_editor(); - - if (!pgm && flag & IDENT_STRICT) - die("Terminal is dumb, but EDITOR unset"); - - return pgm; + return git_editor(); } static const char *pager(int flag) |