author | Jonathan Nieder <jrnieder@gmail.com> | |
Sat, 31 Oct 2009 01:24:04 +0000 (20:24 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 31 Oct 2009 02:15:38 +0000 (19:15 -0700) | ||
commit | eab58f1e8e5ef86b5075ce6dfcd6d3f1b3b888b3 | |
tree | 6760ae17f8fce48ddf13e306c85d0dbcf87f9827 | tree | snapshot |
parent | cd0f8e6d63d3e2744d7d3b2329238be7d064a8ea | commit | diff |
Handle more shell metacharacters in editor names
Pass the editor name to the shell if it contains any susv3 shell
special character (globs, redirections, variable substitutions,
escapes, etc). This way, the meaning of some characters will not
meaninglessly change when others are added, and git commands
implemented in C and in shell scripts will interpret editor names
in the same way.
This does not make the GIT_EDITOR setting any more expressive,
since one could always use single quotes to force the editor to
be passed to the shell.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Pass the editor name to the shell if it contains any susv3 shell
special character (globs, redirections, variable substitutions,
escapes, etc). This way, the meaning of some characters will not
meaninglessly change when others are added, and git commands
implemented in C and in shell scripts will interpret editor names
in the same way.
This does not make the GIT_EDITOR setting any more expressive,
since one could always use single quotes to force the editor to
be passed to the shell.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
editor.c | diff | blob | history |