var: add GIT_SEQUENCE_EDITOR variable
The editor program used by Git when editing the sequencer "todo" file
is determined by examining a few environment variables and also
affected by configuration variables. Introduce "git var
GIT_SEQUENCE_EDITOR" to give users access to the final result of the
logic without having to know the exact details.
This is very similar in spirit to 44fcb497
(Teach git var about
GIT_EDITOR, 2009-11-11) that introduced "git var GIT_EDITOR".
Signed-off-by: Sean Allred <allred.sean@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
57e2c6ebbe
commit
4c3dd9304e
@ -14,6 +14,11 @@ static const char *editor(int flag)
|
||||
return git_editor();
|
||||
}
|
||||
|
||||
static const char *sequence_editor(int flag)
|
||||
{
|
||||
return git_sequence_editor();
|
||||
}
|
||||
|
||||
static const char *pager(int flag)
|
||||
{
|
||||
const char *pgm = git_pager(1);
|
||||
@ -36,6 +41,7 @@ static struct git_var git_vars[] = {
|
||||
{ "GIT_COMMITTER_IDENT", git_committer_info },
|
||||
{ "GIT_AUTHOR_IDENT", git_author_info },
|
||||
{ "GIT_EDITOR", editor },
|
||||
{ "GIT_SEQUENCE_EDITOR", sequence_editor },
|
||||
{ "GIT_PAGER", pager },
|
||||
{ "GIT_DEFAULT_BRANCH", default_branch },
|
||||
{ "", NULL },
|
||||
|
Reference in New Issue
Block a user