{"thread":{"id":"58825","subject":"[PATCH] var: add GIT_SEQUENCE_EDITOR variable","startedAt":"2022-11-20T19:20:23Z","lastAt":"2022-12-17T23:10:54Z","messageCount":4,"participants":["Sean Allred via GitGitGadget","Junio C Hamano","Sean Allred"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"467622","messageId":"pull.1424.git.1668972017089.gitgitgadget@gmail.com","threadId":"58825","inReplyTo":null,"subject":"[PATCH] var: add GIT_SEQUENCE_EDITOR variable","fromName":"Sean Allred via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-11-20T19:20:16Z","receivedAt":"2022-11-20T19:20:23Z","isPatch":true,"sender":{"key":"allred.sean@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2082195?v=4"},"body":"From: Sean Allred <allred.sean@gmail.com>\n\nProvides the same benefits to scripts as exposing GIT_EDITOR, but\nallows distinguishing the 'sequence' editor from the 'core' editor.\n\nSee also 44fcb4977cbae67f4698306ccfe982420ceebcbf.\n\nSigned-off-by: Sean Allred <allred.sean@gmail.com>\n---\n    var: add GIT_SEQUENCE_EDITOR variable\n    \n    In my case, I'm overriding the sequence editor in git rebase -i to do\n    some pre-processing on the todo file, but I'd still like to open up the\n    editor for further manipulation/verification of the todo steps. Just\n    using GIT_EDITOR here will clobber folks' expectations that their\n    custom-built sequence editor pops up (e.g. VSCode or Git Cola).\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1424%2Fvermiculus%2Fsa%2Fgit-var-sequence-editor-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1424/vermiculus/sa/git-var-sequence-editor-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1424\n\n Documentation/git-var.txt |  7 +++++++\n builtin/var.c             | 11 +++++++++++\n t/t0007-git-var.sh        | 38 ++++++++++++++++++++++++++++++++++++++\n 3 files changed, 56 insertions(+)\n\ndiff --git a/Documentation/git-var.txt b/Documentation/git-var.txt\nindex 6aa521fab23..764a94b2a1f 100644\n--- a/Documentation/git-var.txt\n+++ b/Documentation/git-var.txt\n@@ -49,6 +49,13 @@ ifdef::git-default-editor[]\n     The build you are using chose '{git-default-editor}' as the default.\n endif::git-default-editor[]\n \n+GIT_SEQUENCE_EDITOR::\n+    Text editor for use by Git sequencer commands. Like `GIT_EDITOR`,\n+    the value is meant to be interpreted by the shell when it is used.\n+    The order of preference is the `$GIT_SEQUENCE_EDITOR` environment\n+    variable, then `sequence.editor` configuration, and then the value\n+    of `git var GIT_EDITOR`.\n+\n GIT_PAGER::\n     Text viewer for use by Git commands (e.g., 'less').  The value\n     is meant to be interpreted by the shell.  The order of preference\ndiff --git a/builtin/var.c b/builtin/var.c\nindex 491db274292..9a2d31dc4aa 100644\n--- a/builtin/var.c\n+++ b/builtin/var.c\n@@ -19,6 +19,16 @@ static const char *editor(int flag)\n \treturn pgm;\n }\n \n+static const char *sequence_editor(int flag)\n+{\n+\tconst char *pgm = git_sequence_editor();\n+\n+\tif (!pgm && flag & IDENT_STRICT)\n+\t\tdie(\"Terminal is dumb, but EDITOR unset\");\n+\n+\treturn pgm;\n+}\n+\n static const char *pager(int flag)\n {\n \tconst char *pgm = git_pager(1);\n@@ -41,6 +51,7 @@ static struct git_var git_vars[] = {\n \t{ \"GIT_COMMITTER_IDENT\", git_committer_info },\n \t{ \"GIT_AUTHOR_IDENT\",   git_author_info },\n \t{ \"GIT_EDITOR\", editor },\n+\t{ \"GIT_SEQUENCE_EDITOR\", sequence_editor },\n \t{ \"GIT_PAGER\", pager },\n \t{ \"GIT_DEFAULT_BRANCH\", default_branch },\n \t{ \"\", NULL },\ndiff --git a/t/t0007-git-var.sh b/t/t0007-git-var.sh\nindex e56f4b9ac59..3199285fa7b 100755\n--- a/t/t0007-git-var.sh\n+++ b/t/t0007-git-var.sh\n@@ -47,6 +47,44 @@ test_expect_success 'get GIT_DEFAULT_BRANCH with configuration' '\n \t)\n '\n \n+test_expect_success 'get GIT_SEQUENCE_EDITOR without configuration' '\n+\t(\n+\t\tsane_unset GIT_SEQUENCE_EDITOR &&\n+\t\tgit var GIT_EDITOR >expect &&\n+\t\tgit var GIT_SEQUENCE_EDITOR >actual &&\n+\t\ttest_cmp expect actual\n+\t)\n+'\n+\n+test_expect_success 'get GIT_SEQUENCE_EDITOR with configuration' '\n+\ttest_config sequence.editor foo &&\n+\t(\n+\t\tsane_unset GIT_SEQUENCE_EDITOR &&\n+\t\techo foo >expect &&\n+\t\tgit var GIT_SEQUENCE_EDITOR >actual &&\n+\t\ttest_cmp expect actual\n+\t)\n+'\n+\n+test_expect_success 'get GIT_SEQUENCE_EDITOR with environment variable' '\n+\t(\n+\t\tsane_unset GIT_SEQUENCE_EDITOR &&\n+\t\techo bar >expect &&\n+\t\tGIT_SEQUENCE_EDITOR=bar git var GIT_SEQUENCE_EDITOR >actual &&\n+\t\ttest_cmp expect actual\n+\t)\n+'\n+\n+test_expect_success 'get GIT_SEQUENCE_EDITOR with configuration and environment variable' '\n+\ttest_config sequence.editor foo &&\n+\t(\n+\t\tsane_unset GIT_SEQUENCE_EDITOR &&\n+\t\techo bar >expect &&\n+\t\tGIT_SEQUENCE_EDITOR=bar git var GIT_SEQUENCE_EDITOR >actual &&\n+\t\ttest_cmp expect actual\n+\t)\n+'\n+\n # For git var -l, we check only a representative variable;\n # testing the whole output would make our test too brittle with\n # respect to unrelated changes in the test suite's environment.\n\nbase-commit: a0789512c5a4ae7da935cd2e419f253cb3cb4ce7\n-- \ngitgitgadget\n"},{"id":"467663","messageId":"xmqq1qpwwwxg.fsf@gitster.g","threadId":"58825","inReplyTo":"pull.1424.git.1668972017089.gitgitgadget@gmail.com","subject":"Re: [PATCH] var: add GIT_SEQUENCE_EDITOR variable","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-11-21T08:09:47Z","receivedAt":"2022-11-21T08:09:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Sean Allred via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Sean Allred <allred.sean@gmail.com>\n>\n> Provides the same benefits to scripts as exposing GIT_EDITOR, but\n> allows distinguishing the 'sequence' editor from the 'core' editor.\n>\n> See also 44fcb4977cbae67f4698306ccfe982420ceebcbf.\n\nWhy should we ;-)?\n\nIf you explain why \"git var GIT_SEQUENCE_EDITOR\" is useful in a more\ndirect way, you do not even have to refer to a long hexadecimal string\nwhich by itself does not mean anything to sane human beings.\n\n    The editor program used by Git when editing the sequencer \"todo\"\n    file is determined by examining a few environment variables and\n    also affected by configuration variables.  Introduce \"git var\n    GIT_SEQUENCE_EDITOR\" that gives users an access to the final\n    result of the logic without having to know the exact detail.\n\n    This is very similar in spirit to 44fcb497 (Teach git var about\n    GIT_EDITOR, 2009-11-11) that introduced \"git var GIT_EDITOR\".\n\nor something like that, perhaps?\n\n> +GIT_SEQUENCE_EDITOR::\n> +    Text editor for use by Git sequencer commands. Like `GIT_EDITOR`,\n\nDo our readers know what \"Git sequencer commands\" are?  \"rebase -i\"\nof course is the primary one, but \"cherry-pick\" and \"revert\" that\ndeals with multiple commits are technically \"sequencer commands\", as\nthey also use the sequencer machinery.  But for them, the users do\nnot get a chance to edit the \"todo\" list with their sequence editor,\nunlike \"rebase -i\".\n\nI am wondering if it is easier to understand, without losing\ntechnical correctness, to exactly name the command, without\npretending as if the sequence editor is used in situations wider\nthan where \"rebase -i\" is used, e.g.\n\n\tThe text editor program used to edit the 'todo' file while\n\trunning \"git rebase -i\".\n\nor something.\n\n> +    the value is meant to be interpreted by the shell when it is used.\n> +    The order of preference is the `$GIT_SEQUENCE_EDITOR` environment\n> +    variable, then `sequence.editor` configuration, and then the value\n> +    of `git var GIT_EDITOR`.\n\nOK.\n\n> diff --git a/builtin/var.c b/builtin/var.c\n> index 491db274292..9a2d31dc4aa 100644\n> --- a/builtin/var.c\n> +++ b/builtin/var.c\n> @@ -19,6 +19,16 @@ static const char *editor(int flag)\n>  \treturn pgm;\n>  }\n>  \n> +static const char *sequence_editor(int flag)\n> +{\n> +\tconst char *pgm = git_sequence_editor();\n> +\n> +\tif (!pgm && flag & IDENT_STRICT)\n> +\t\tdie(\"Terminal is dumb, but EDITOR unset\");\n\nI know this was copied from editor(), but the message does not make\nmuch sense.  It's not like the caller of read_var() is not prepared\nto see a NULL returned, so letting it return NULL would make more\nsense.  Since the ancient past back when editor() function was\nwritten, launch_editor() and the logic to die with \"on dumb terminal\nyou must specify an EDITOR\" have migrated to editor.c and there is\nno strong reason to keep the corresponding die() even in editor()\nfunction (I do not recommend removing it as part of this topic,\nthough), and adding a new one makes even less sense.\n\n"},{"id":"467865","messageId":"87cz9dq1dx.fsf@gmail.com","threadId":"58825","inReplyTo":"xmqq1qpwwwxg.fsf@gitster.g","subject":"Re: [PATCH] var: add GIT_SEQUENCE_EDITOR variable","fromName":"Sean Allred","fromEmail":"allred.sean@gmail.com","sentAt":"2022-11-23T12:21:47Z","receivedAt":"2022-11-23T13:10:39Z","isPatch":true,"sender":{"key":"allred.sean@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2082195?v=4"},"body":"\nJunio C Hamano <gitster@pobox.com> writes:\n>> Provides the same benefits to scripts as exposing GIT_EDITOR, but\n>> allows distinguishing the 'sequence' editor from the 'core' editor.\n>>\n>> See also 44fcb4977cbae67f4698306ccfe982420ceebcbf.\n>\n> Why should we ;-)?\n\nI must admit I struggled quite a bit with a useful commit message, so I\ngreatly appreciate the suggestion :-) I've incorporated your suggestion\nfor a future v2.\n\n>> +GIT_SEQUENCE_EDITOR::\n>> +    Text editor for use by Git sequencer commands. Like `GIT_EDITOR`,\n>\n> Do our readers know what \"Git sequencer commands\" are?  \"rebase -i\"\n> of course is the primary one, but \"cherry-pick\" and \"revert\" that\n> deals with multiple commits are technically \"sequencer commands\", as\n> they also use the sequencer machinery.  But for them, the users do\n> not get a chance to edit the \"todo\" list with their sequence editor,\n> unlike \"rebase -i\".\n\nThat's a good point; I hadn't considered that as a potential source of\nconfusion -- prefering instead to future-proof the docs at the cost of\nunderstandability :-)\n\n> I am wondering if it is easier to understand, without losing\n> technical correctness, to exactly name the command, without\n> pretending as if the sequence editor is used in situations wider\n> than where \"rebase -i\" is used, e.g.\n>\n> \tThe text editor program used to edit the 'todo' file while\n> \trunning \"git rebase -i\".\n\nI've incorporated your suggestion. It's possibly worth noting that I had\nwanted to prefer prose ('interactive rebase') over a specific invocation\n('git rebase -i'), but I see existing precedent for referring to it as\nthe latter in documentation (and release notes especially). I suppose\nthis practice is intended (either consciously or otherwise) to make it\nmore straightforward to cross-reference different pieces of the\ndocumentation?\n\n>> diff --git a/builtin/var.c b/builtin/var.c\n>> index 491db274292..9a2d31dc4aa 100644\n>> --- a/builtin/var.c\n>> +++ b/builtin/var.c\n>> @@ -19,6 +19,16 @@ static const char *editor(int flag)\n>>  \treturn pgm;\n>>  }\n>>\n>> +static const char *sequence_editor(int flag)\n>> +{\n>> +\tconst char *pgm = git_sequence_editor();\n>> +\n>> +\tif (!pgm && flag & IDENT_STRICT)\n>> +\t\tdie(\"Terminal is dumb, but EDITOR unset\");\n>\n> I know this was copied from editor(), but the message does not make\n> much sense.  It's not like the caller of read_var() is not prepared\n> to see a NULL returned, so letting it return NULL would make more\n> sense.  Since the ancient past back when editor() function was\n> written, launch_editor() and the logic to die with \"on dumb terminal\n> you must specify an EDITOR\" have migrated to editor.c and there is\n> no strong reason to keep the corresponding die() even in editor()\n> function (I do not recommend removing it as part of this topic,\n> though), and adding a new one makes even less sense.\n\nI'm glad you brought this up. To be perfectly honest, I'm not confident\nI know what IDENT_STRICT is even supposed to mean -- it looks to be\nundocumented in cache.h. Here's what I *think* I've been able to piece\ntogether based on what you've said and some commit history:\n\n    f9bc573fdaeaf8621008f3f49aaaa64869791691 suggests that setting\n    IDENT_STRICT is intended to be 'more upset' about 'things' (the\n    commit I mention is specifically talking about identities -- which\n    explains the IDENT_* prefix) that aren't well-defined. In porcelain\n    code, we want to quit immediately if there's nothing available since\n    you can't really open up COMMIT_MSG, e.g., without a well-defined\n    editor. Better to die early with a semi-useful message than to let\n    the issue propagate downstream.\n\n    This does not apply to git-var since the purpose of this command is\n    not to invoke an editor, but to inspect configuration state via\n    well-defined API. In this context, it's not necessary/appropriate to\n    die early since, for the purposes of git-var, 'no configuration' is\n    a perfectly valid (albeit confusing) state to be in.\n\nI'd like to confirm this / understand more about what's going on here\nbefore making the code change on this one. If I can understand what's\ngoing on here well enough to write an informed commit message, I can\nremove this vestigial code from editor() in a separate patch.\n\n--\nSean Allred\n"},{"id":"469235","messageId":"pull.1424.v2.git.1671318599482.gitgitgadget@gmail.com","threadId":"58825","inReplyTo":"pull.1424.git.1668972017089.gitgitgadget@gmail.com","subject":"[PATCH v2] var: add GIT_SEQUENCE_EDITOR variable","fromName":"Sean Allred via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-12-17T23:09:59Z","receivedAt":"2022-12-17T23:10:54Z","isPatch":true,"sender":{"key":"allred.sean@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2082195?v=4"},"body":"From: Sean Allred <allred.sean@gmail.com>\n\nThe editor program used by Git when editing the sequencer \"todo\" file\nis determined by examining a few environment variables and also\naffected by configuration variables. Introduce \"git var\nGIT_SEQUENCE_EDITOR\" to give users access to the final result of the\nlogic without having to know the exact details.\n\nThis is very similar in spirit to 44fcb497 (Teach git var about\nGIT_EDITOR, 2009-11-11) that introduced \"git var GIT_EDITOR\".\n\nSigned-off-by: Sean Allred <allred.sean@gmail.com>\n---\n    var: add GIT_SEQUENCE_EDITOR variable\n    \n    In my case, I'm overriding the sequence editor in git rebase -i to do\n    some pre-processing on the todo file, but I'd still like to open up the\n    editor for further manipulation/verification of the todo steps. Just\n    using GIT_EDITOR here will clobber folks' expectations that their\n    custom-built sequence editor pops up (e.g. VSCode or Git Cola).\n    \n    Changes since v1:\n    \n     * rebased on current main\n     * following new, simplified patterns from my previous pull-request\n       merged in d8184580\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1424%2Fvermiculus%2Fsa%2Fgit-var-sequence-editor-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1424/vermiculus/sa/git-var-sequence-editor-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/1424\n\nRange-diff vs v1:\n\n 1:  aa5ac73ab39 ! 1:  c9683fabf3d var: add GIT_SEQUENCE_EDITOR variable\n     @@ Metadata\n       ## Commit message ##\n          var: add GIT_SEQUENCE_EDITOR variable\n      \n     -    Provides the same benefits to scripts as exposing GIT_EDITOR, but\n     -    allows distinguishing the 'sequence' editor from the 'core' editor.\n     +    The editor program used by Git when editing the sequencer \"todo\" file\n     +    is determined by examining a few environment variables and also\n     +    affected by configuration variables. Introduce \"git var\n     +    GIT_SEQUENCE_EDITOR\" to give users access to the final result of the\n     +    logic without having to know the exact details.\n      \n     -    See also 44fcb4977cbae67f4698306ccfe982420ceebcbf.\n     +    This is very similar in spirit to 44fcb497 (Teach git var about\n     +    GIT_EDITOR, 2009-11-11) that introduced \"git var GIT_EDITOR\".\n      \n          Signed-off-by: Sean Allred <allred.sean@gmail.com>\n      \n     @@ Documentation/git-var.txt: ifdef::git-default-editor[]\n       endif::git-default-editor[]\n       \n      +GIT_SEQUENCE_EDITOR::\n     -+    Text editor for use by Git sequencer commands. Like `GIT_EDITOR`,\n     -+    the value is meant to be interpreted by the shell when it is used.\n     -+    The order of preference is the `$GIT_SEQUENCE_EDITOR` environment\n     -+    variable, then `sequence.editor` configuration, and then the value\n     -+    of `git var GIT_EDITOR`.\n     ++    Text editor used to edit the 'todo' file while running `git rebase\n     ++    -i`. Like `GIT_EDITOR`, the value is meant to be interpreted by\n     ++    the shell when it is used. The order of preference is the\n     ++    `$GIT_SEQUENCE_EDITOR` environment variable, then\n     ++    `sequence.editor` configuration, and then the value of `git var\n     ++    GIT_EDITOR`.\n      +\n       GIT_PAGER::\n           Text viewer for use by Git commands (e.g., 'less').  The value\n     @@ Documentation/git-var.txt: ifdef::git-default-editor[]\n      \n       ## builtin/var.c ##\n      @@ builtin/var.c: static const char *editor(int flag)\n     - \treturn pgm;\n     + \treturn git_editor();\n       }\n       \n      +static const char *sequence_editor(int flag)\n      +{\n     -+\tconst char *pgm = git_sequence_editor();\n     -+\n     -+\tif (!pgm && flag & IDENT_STRICT)\n     -+\t\tdie(\"Terminal is dumb, but EDITOR unset\");\n     -+\n     -+\treturn pgm;\n     ++\treturn git_sequence_editor();\n      +}\n      +\n       static const char *pager(int flag)\n     @@ builtin/var.c: static struct git_var git_vars[] = {\n       \t{ \"\", NULL },\n      \n       ## t/t0007-git-var.sh ##\n     -@@ t/t0007-git-var.sh: test_expect_success 'get GIT_DEFAULT_BRANCH with configuration' '\n     +@@ t/t0007-git-var.sh: test_expect_success 'get GIT_EDITOR with configuration and environment variable\n       \t)\n       '\n       \n\n\n Documentation/git-var.txt |  8 ++++++++\n builtin/var.c             |  6 ++++++\n t/t0007-git-var.sh        | 38 ++++++++++++++++++++++++++++++++++++++\n 3 files changed, 52 insertions(+)\n\ndiff --git a/Documentation/git-var.txt b/Documentation/git-var.txt\nindex 0ab5bfa7d72..f40202b8e3a 100644\n--- a/Documentation/git-var.txt\n+++ b/Documentation/git-var.txt\n@@ -50,6 +50,14 @@ ifdef::git-default-editor[]\n     The build you are using chose '{git-default-editor}' as the default.\n endif::git-default-editor[]\n \n+GIT_SEQUENCE_EDITOR::\n+    Text editor used to edit the 'todo' file while running `git rebase\n+    -i`. Like `GIT_EDITOR`, the value is meant to be interpreted by\n+    the shell when it is used. The order of preference is the\n+    `$GIT_SEQUENCE_EDITOR` environment variable, then\n+    `sequence.editor` configuration, and then the value of `git var\n+    GIT_EDITOR`.\n+\n GIT_PAGER::\n     Text viewer for use by Git commands (e.g., 'less').  The value\n     is meant to be interpreted by the shell.  The order of preference\ndiff --git a/builtin/var.c b/builtin/var.c\nindex a1a2522126f..a80c1df86fd 100644\n--- a/builtin/var.c\n+++ b/builtin/var.c\n@@ -14,6 +14,11 @@ static const char *editor(int flag)\n \treturn git_editor();\n }\n \n+static const char *sequence_editor(int flag)\n+{\n+\treturn git_sequence_editor();\n+}\n+\n static const char *pager(int flag)\n {\n \tconst char *pgm = git_pager(1);\n@@ -36,6 +41,7 @@ static struct git_var git_vars[] = {\n \t{ \"GIT_COMMITTER_IDENT\", git_committer_info },\n \t{ \"GIT_AUTHOR_IDENT\",   git_author_info },\n \t{ \"GIT_EDITOR\", editor },\n+\t{ \"GIT_SEQUENCE_EDITOR\", sequence_editor },\n \t{ \"GIT_PAGER\", pager },\n \t{ \"GIT_DEFAULT_BRANCH\", default_branch },\n \t{ \"\", NULL },\ndiff --git a/t/t0007-git-var.sh b/t/t0007-git-var.sh\nindex 433d242897c..eeb8539c1bc 100755\n--- a/t/t0007-git-var.sh\n+++ b/t/t0007-git-var.sh\n@@ -109,6 +109,44 @@ test_expect_success 'get GIT_EDITOR with configuration and environment variable\n \t)\n '\n \n+test_expect_success 'get GIT_SEQUENCE_EDITOR without configuration' '\n+\t(\n+\t\tsane_unset GIT_SEQUENCE_EDITOR &&\n+\t\tgit var GIT_EDITOR >expect &&\n+\t\tgit var GIT_SEQUENCE_EDITOR >actual &&\n+\t\ttest_cmp expect actual\n+\t)\n+'\n+\n+test_expect_success 'get GIT_SEQUENCE_EDITOR with configuration' '\n+\ttest_config sequence.editor foo &&\n+\t(\n+\t\tsane_unset GIT_SEQUENCE_EDITOR &&\n+\t\techo foo >expect &&\n+\t\tgit var GIT_SEQUENCE_EDITOR >actual &&\n+\t\ttest_cmp expect actual\n+\t)\n+'\n+\n+test_expect_success 'get GIT_SEQUENCE_EDITOR with environment variable' '\n+\t(\n+\t\tsane_unset GIT_SEQUENCE_EDITOR &&\n+\t\techo bar >expect &&\n+\t\tGIT_SEQUENCE_EDITOR=bar git var GIT_SEQUENCE_EDITOR >actual &&\n+\t\ttest_cmp expect actual\n+\t)\n+'\n+\n+test_expect_success 'get GIT_SEQUENCE_EDITOR with configuration and environment variable' '\n+\ttest_config sequence.editor foo &&\n+\t(\n+\t\tsane_unset GIT_SEQUENCE_EDITOR &&\n+\t\techo bar >expect &&\n+\t\tGIT_SEQUENCE_EDITOR=bar git var GIT_SEQUENCE_EDITOR >actual &&\n+\t\ttest_cmp expect actual\n+\t)\n+'\n+\n # For git var -l, we check only a representative variable;\n # testing the whole output would make our test too brittle with\n # respect to unrelated changes in the test suite's environment.\n\nbase-commit: 57e2c6ebbe7108b35ba30184dcbcb6c34c929ad8\n-- \ngitgitgadget\n"}]}