{"thread":{"id":"61165","subject":"[PATCH 2/3] grep docs: describe --recurse-submodules further and improve formatting a bit","startedAt":"2024-03-20T21:08:53Z","lastAt":"2024-03-23T19:46:18Z","messageCount":6,"participants":["Dragan Simic","Jean-Noël AVILA"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"491039","messageId":"cover.1710968761.git.dsimic@manjaro.org","threadId":"61165","inReplyTo":null,"subject":"[PATCH 0/3] Assorted improvements salvaged from an earlier series","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2024-03-20T21:08:43Z","receivedAt":"2024-03-20T21:08:53Z","isPatch":true,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"This series contains patches salvaged from my earlier series, [1] for\nwhich it has been concluded to be not acceptable for merging, because of\npossible issues with various git scripts. [2]\n\nChanges introduced to the patches are described separately in each patch.\n\n[1] https://lore.kernel.org/git/cover.1710781235.git.dsimic@manjaro.org/T/#u\n[2] https://lore.kernel.org/git/d8475579f014a90b27efaf6207bc6fb0@manjaro.org/\n\nDragan Simic (3):\n  grep: perform some minor code and comment cleanups\n  grep docs: describe --recurse-submodules further and improve\n    formatting a bit\n  grep docs: describe --no-index further and improve formatting a bit\n\n Documentation/config/grep.txt |  2 +-\n Documentation/git-grep.txt    | 36 +++++++++++++++++++++--------------\n builtin/grep.c                | 21 ++++++++------------\n 3 files changed, 31 insertions(+), 28 deletions(-)\n\n"},{"id":"491038","messageId":"eebe88d753b5e56126e26a5f69cbe3c1b1db1483.1710968761.git.dsimic@manjaro.org","threadId":"61165","inReplyTo":"cover.1710968761.git.dsimic@manjaro.org","subject":"[PATCH 2/3] grep docs: describe --recurse-submodules further and improve formatting a bit","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2024-03-20T21:08:45Z","receivedAt":"2024-03-20T21:08:54Z","isPatch":true,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"Clarify that --recurse-submodules cannot be used together with --untracked,\nand improve the formatting in a couple of places, to make it visually clear\nthat those are the commands or the names of configuration options.\n\nWhile there, change a couple of \"<tree>\" placeholders to \"_<tree>_\", to help\nwith an ongoing translation improvement effort. [1]\n\n[1] https://lore.kernel.org/git/CAPig+cQc8W4JOpB+TMP=czketU1U7wcY_x9bsP5T=3-XjGLhRQ@mail.gmail.com/\n\nSigned-off-by: Dragan Simic <dsimic@manjaro.org>\n---\n\nNotes:\n    This patch is salvaged from my earlier series, [2] for which it has been\n    concluded to be not acceptable for merging, because of possible issues\n    with various git scripts. [3]\n    \n    Compared to the previous version, this version adds some more small\n    formatting improvements of the same kind, and also changes a couple of\n    \"<tree>\" placeholders to \"_<tree>_\", as suggested by Eric Sunshine. [1]\n    \n    [2] https://lore.kernel.org/git/cover.1710781235.git.dsimic@manjaro.org/T/#u\n    [3] https://lore.kernel.org/git/d8475579f014a90b27efaf6207bc6fb0@manjaro.org/\n\n Documentation/config/grep.txt |  2 +-\n Documentation/git-grep.txt    | 10 +++++-----\n 2 files changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/config/grep.txt b/Documentation/config/grep.txt\nindex e521f20390ce..10041f27b0c8 100644\n--- a/Documentation/config/grep.txt\n+++ b/Documentation/config/grep.txt\n@@ -24,5 +24,5 @@ grep.fullName::\n \tIf set to true, enable `--full-name` option by default.\n \n grep.fallbackToNoIndex::\n-\tIf set to true, fall back to git grep --no-index if git grep\n+\tIf set to true, fall back to `git grep --no-index` if `git grep`\n \tis executed outside of a git repository.  Defaults to false.\ndiff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt\nindex 0d0103c780af..f64f40e9775a 100644\n--- a/Documentation/git-grep.txt\n+++ b/Documentation/git-grep.txt\n@@ -64,9 +64,9 @@ OPTIONS\n --recurse-submodules::\n \tRecursively search in each submodule that is active and\n \tchecked out in the repository.  When used in combination with the\n-\t<tree> option the prefix of all submodule output will be the name of\n-\tthe parent project's <tree> object. This option has no effect\n-\tif `--no-index` is given.\n+\t_<tree>_ option the prefix of all submodule output will be the name of\n+\tthe parent project's _<tree>_ object.  This option cannot be used together\n+\twith `--untracked`, and it has no effect if `--no-index` is specified.\n \n -a::\n --text::\n@@ -178,7 +178,7 @@ providing this option will cause it to die.\n \tUse \\0 as the delimiter for pathnames in the output, and print\n \tthem verbatim. Without this option, pathnames with \"unusual\"\n \tcharacters are quoted as explained for the configuration\n-\tvariable core.quotePath (see linkgit:git-config[1]).\n+\tvariable `core.quotePath` (see linkgit:git-config[1]).\n \n -o::\n --only-matching::\n@@ -332,7 +332,7 @@ EXAMPLES\n NOTES ON THREADS\n ----------------\n \n-The `--threads` option (and the grep.threads configuration) will be ignored when\n+The `--threads` option (and the `grep.threads` configuration) will be ignored when\n `--open-files-in-pager` is used, forcing a single-threaded execution.\n \n When grepping the object store (with `--cached` or giving tree objects), running\n"},{"id":"491040","messageId":"6cf18d2cd76a9caf2ca2a782030cafb3e9432e84.1710968761.git.dsimic@manjaro.org","threadId":"61165","inReplyTo":"cover.1710968761.git.dsimic@manjaro.org","subject":"[PATCH 1/3] grep: perform some minor code and comment cleanups","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2024-03-20T21:08:44Z","receivedAt":"2024-03-20T21:08:54Z","isPatch":true,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"Move some variable definitions around, and reflow one comment block, to\nmake the code a bit neater after spotting those slightly unpolished areas.\nThere are no functional changes to the source code.\n\nSigned-off-by: Dragan Simic <dsimic@manjaro.org>\n---\n\nNotes:\n    This patch is salvaged from my earlier series, [1] for which it has been\n    concluded to be not acceptable for merging, because of possible issues\n    with various git scripts. [2]\n    \n    Compared to the previous version, there are no changes in this version.\n    As expected and as already discussed, patches like this one inevitably\n    raise a few eyebrows. [3][4][5]\n    \n    [1] https://lore.kernel.org/git/cover.1710781235.git.dsimic@manjaro.org/T/#u\n    [2] https://lore.kernel.org/git/d8475579f014a90b27efaf6207bc6fb0@manjaro.org/\n    [3] https://lore.kernel.org/git/CAPig+cQ6Y2oOaPkKFsD41beXLHjhD++nmf59xrcswpb6_Q-sdA@mail.gmail.com/\n    [4] https://lore.kernel.org/git/xmqqjzlzt61d.fsf@gitster.g/#t\n    [5] https://lore.kernel.org/git/24093dca675c49cfde39f6d6efca2342@manjaro.org/\n\n builtin/grep.c | 21 ++++++++-------------\n 1 file changed, 8 insertions(+), 13 deletions(-)\n\ndiff --git a/builtin/grep.c b/builtin/grep.c\nindex 982bcfc4b1df..af89c8b5cb19 100644\n--- a/builtin/grep.c\n+++ b/builtin/grep.c\n@@ -623,13 +623,13 @@ static int grep_tree(struct grep_opt *opt, const struct pathspec *pathspec,\n \t\t     struct tree_desc *tree, struct strbuf *base, int tn_len,\n \t\t     int check_attr)\n {\n-\tstruct repository *repo = opt->repo;\n-\tint hit = 0;\n+\tint hit = 0, name_base_len = 0;\n+\tint old_baselen = base->len;\n \tenum interesting match = entry_not_interesting;\n+\tstruct repository *repo = opt->repo;\n \tstruct name_entry entry;\n-\tint old_baselen = base->len;\n \tstruct strbuf name = STRBUF_INIT;\n-\tint name_base_len = 0;\n+\n \tif (repo->submodule_prefix) {\n \t\tstrbuf_addstr(&name, repo->submodule_prefix);\n \t\tname_base_len = name.len;\n@@ -890,19 +890,15 @@ static int pattern_callback(const struct option *opt, const char *arg,\n \n int cmd_grep(int argc, const char **argv, const char *prefix)\n {\n-\tint hit = 0;\n+\tint hit = 0, seen_dashdash = 0, use_index = 1;\n \tint cached = 0, untracked = 0, opt_exclude = -1;\n-\tint seen_dashdash = 0;\n \tint external_grep_allowed__ignored;\n+\tint i, dummy, allow_revs;\n \tconst char *show_in_pager = NULL, *default_pager = \"dummy\";\n \tstruct grep_opt opt;\n \tstruct object_array list = OBJECT_ARRAY_INIT;\n \tstruct pathspec pathspec;\n \tstruct string_list path_list = STRING_LIST_INIT_DUP;\n-\tint i;\n-\tint dummy;\n-\tint use_index = 1;\n-\tint allow_revs;\n \n \tstruct option options[] = {\n \t\tOPT_BOOL(0, \"cached\", &cached,\n@@ -1059,9 +1055,8 @@ int cmd_grep(int argc, const char **argv, const char *prefix)\n \t\trecurse_submodules = 0;\n \n \t/*\n-\t * skip a -- separator; we know it cannot be\n-\t * separating revisions from pathnames if\n-\t * we haven't even had any patterns yet\n+\t * skip a -- separator; we know it cannot be separating revisions\n+\t * from pathnames if we haven't even had any patterns yet\n \t */\n \tif (argc > 0 && !opt.pattern_list && !strcmp(argv[0], \"--\")) {\n \t\targv++;\n"},{"id":"491041","messageId":"264643a638fd1ee9970f96e7aa4914c37e30b3d2.1710968761.git.dsimic@manjaro.org","threadId":"61165","inReplyTo":"cover.1710968761.git.dsimic@manjaro.org","subject":"[PATCH 3/3] grep docs: describe --no-index further and improve formatting a bit","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2024-03-20T21:08:46Z","receivedAt":"2024-03-20T21:08:54Z","isPatch":true,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"Improve the description of --no-index, to make a bit more clear what this\noption actually does under the hood, and how it is meant to be used.  Describe\nthe dependency between --no-index and either of the --cached and --untracked\noptions, which cannot be used together.\n\nAs part of that, shuffle a couple of the options, to make the documentation\nflow a bit better;  it makes more sense to describe first the options that\nhave something in common, and to after that describe an option that has some\ndependency on the already described options.\n\nWhile there, improve the descriptions of grep worker threads a bit, to give\nthem better context.  Adjust the language a bit, to avoid addressing the\nreader, and perform some minor formatting improvements, to make it clear\nit's the git commands, command parameters, and configuration option names.\n\nSigned-off-by: Dragan Simic <dsimic@manjaro.org>\n---\n\nNotes:\n    This patch is salvaged from my earlier series, [1] for which it has been\n    concluded to be not acceptable for merging, because of possible issues\n    with various git scripts. [2]\n    \n    Compared to the previous version, this version continues the effort to\n    improve the description of --no-index, by also incorporating the possible\n    improvements pointed out by Junio. [3]  This version also improves the\n    wording of some related descriptions, mainly related to grep.threads,\n    and performs some additional small formatting improvements.\n    \n    [1] https://lore.kernel.org/git/cover.1710781235.git.dsimic@manjaro.org/T/#u\n    [2] https://lore.kernel.org/git/d8475579f014a90b27efaf6207bc6fb0@manjaro.org/\n    [3] https://lore.kernel.org/git/xmqqwmpzrqfv.fsf@gitster.g/\n\n Documentation/git-grep.txt | 26 +++++++++++++++++---------\n 1 file changed, 17 insertions(+), 9 deletions(-)\n\ndiff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt\nindex f64f40e9775a..b144401b3698 100644\n--- a/Documentation/git-grep.txt\n+++ b/Documentation/git-grep.txt\n@@ -28,7 +28,7 @@ SYNOPSIS\n \t   [-f <file>] [-e] <pattern>\n \t   [--and|--or|--not|(|)|-e <pattern>...]\n \t   [--recurse-submodules] [--parent-basename <basename>]\n-\t   [ [--[no-]exclude-standard] [--cached | --no-index | --untracked] | <tree>...]\n+\t   [ [--[no-]exclude-standard] [--cached | --untracked | --no-index] | <tree>...]\n \t   [--] [<pathspec>...]\n \n DESCRIPTION\n@@ -45,13 +45,20 @@ OPTIONS\n \tInstead of searching tracked files in the working tree, search\n \tblobs registered in the index file.\n \n---no-index::\n-\tSearch files in the current directory that is not managed by Git.\n-\n --untracked::\n \tIn addition to searching in the tracked files in the working\n \ttree, search also in untracked files.\n \n+--no-index::\n+\tSearch files in the current directory that is not managed by Git,\n+\tor by ignoring that the current directory is managed by Git.  This\n+\tallows `git-grep(1)` to be used as the regular `grep(1)` utility,\n+\twith the additional benefits, such as using multiple worker threads\n+\tto speed up searches.\n++\n+This option cannot be used together with `--cached` or `--untracked`.\n+See also `grep.fallbackToNoIndex` in 'CONFIGURATION' below.\n+\n --no-exclude-standard::\n \tAlso search in ignored files by not honoring the `.gitignore`\n \tmechanism. Only useful with `--untracked`.\n@@ -248,8 +255,9 @@ providing this option will cause it to die.\n \ta non-zero status.\n \n --threads <num>::\n-\tNumber of grep worker threads to use.\n-\tSee `grep.threads` in 'CONFIGURATION' for more information.\n+\tNumber of `grep` worker threads to use, to speed up searches.\n+\tSee 'NOTES ON THREADS' and `grep.threads` in 'CONFIGURATION'\n+\tfor more information.\n \n -f <file>::\n \tRead patterns from <file>, one per line.\n@@ -336,9 +344,9 @@ The `--threads` option (and the `grep.threads` configuration) will be ignored wh\n `--open-files-in-pager` is used, forcing a single-threaded execution.\n \n When grepping the object store (with `--cached` or giving tree objects), running\n-with multiple threads might perform slower than single threaded if `--textconv`\n-is given and there are too many text conversions. So if you experience low\n-performance in this case, it might be desirable to use `--threads=1`.\n+with multiple threads might perform slower than single-threaded if `--textconv`\n+is given and there are too many text conversions.  Thus, if low performance is\n+experienced in this case, it might be desirable to use `--threads=1`.\n \n CONFIGURATION\n -------------\n"},{"id":"491313","messageId":"6056709.lOV4Wx5bFT@cayenne","threadId":"61165","inReplyTo":"264643a638fd1ee9970f96e7aa4914c37e30b3d2.1710968761.git.dsimic@manjaro.org","subject":"Re: [PATCH 3/3] grep docs: describe --no-index further and improve formatting a bit","fromName":"Jean-Noël AVILA","fromEmail":"jn.avila@free.fr","sentAt":"2024-03-23T19:26:38Z","receivedAt":"2024-03-23T19:26:49Z","isPatch":true,"sender":{"key":"jn.avila@free.fr","avatar":"https://avatars.githubusercontent.com/u/156172?v=4"},"body":"On Wednesday, 20 March 2024 22:08:46 CET Dragan Simic wrote:\n> Improve the description of --no-index, to make a bit more clear what this\n> option actually does under the hood, and how it is meant to be used.  \nDescribe\n> the dependency between --no-index and either of the --cached and --untracked\n> options, which cannot be used together.\n> \n> As part of that, shuffle a couple of the options, to make the documentation\n> flow a bit better;  it makes more sense to describe first the options that\n> have something in common, and to after that describe an option that has some\n> dependency on the already described options.\n> \n> While there, improve the descriptions of grep worker threads a bit, to give\n> them better context.  Adjust the language a bit, to avoid addressing the\n> reader, and perform some minor formatting improvements, to make it clear\n> it's the git commands, command parameters, and configuration option names.\n> \n> Signed-off-by: Dragan Simic <dsimic@manjaro.org>\n> ---\n> \n> Notes:\n>     This patch is salvaged from my earlier series, [1] for which it has been\n>     concluded to be not acceptable for merging, because of possible issues\n>     with various git scripts. [2]\n>     \n>     Compared to the previous version, this version continues the effort to\n>     improve the description of --no-index, by also incorporating the \npossible\n>     improvements pointed out by Junio. [3]  This version also improves the\n>     wording of some related descriptions, mainly related to grep.threads,\n>     and performs some additional small formatting improvements.\n>     \n>     [1] https://lore.kernel.org/git/cover.1710781235.git.dsimic@manjaro.org/\nT/#u\n>     [2] https://lore.kernel.org/git/\nd8475579f014a90b27efaf6207bc6fb0@manjaro.org/\n>     [3] https://lore.kernel.org/git/xmqqwmpzrqfv.fsf@gitster.g/\n> \n>  Documentation/git-grep.txt | 26 +++++++++++++++++---------\n>  1 file changed, 17 insertions(+), 9 deletions(-)\n> \n> diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt\n> index f64f40e9775a..b144401b3698 100644\n> --- a/Documentation/git-grep.txt\n> +++ b/Documentation/git-grep.txt\n> @@ -28,7 +28,7 @@ SYNOPSIS\n>  \t   [-f <file>] [-e] <pattern>\n>  \t   [--and|--or|--not|(|)|-e <pattern>...]\n>  \t   [--recurse-submodules] [--parent-basename <basename>]\n> -\t   [ [--[no-]exclude-standard] [--cached | --no-index | --\nuntracked] | <tree>...]\n> +\t   [ [--[no-]exclude-standard] [--cached | --untracked | --no-\nindex] | <tree>...]\n\nThis change gives precedence to some option in alternatives, which seems \nweird.\n\n>  \t   [--] [<pathspec>...]\n>  \n>  DESCRIPTION\n> @@ -45,13 +45,20 @@ OPTIONS\n>  \tInstead of searching tracked files in the working tree, search\n>  \tblobs registered in the index file.\n>  \n> ---no-index::\n> -\tSearch files in the current directory that is not managed by Git.\n> -\n>  --untracked::\n>  \tIn addition to searching in the tracked files in the working\n>  \ttree, search also in untracked files.\n>  \n> +--no-index::\n> +\tSearch files in the current directory that is not managed by Git,\n> +\tor by ignoring that the current directory is managed by Git.  This\n> +\tallows `git-grep(1)` to be used as the regular `grep(1)` utility,\n\nAuto-referencing the git-grep manpage in itself is useless.\n\n> +\twith the additional benefits, such as using multiple worker threads\n> +\tto speed up searches.\n> ++\n> +This option cannot be used together with `--cached` or `--untracked`.\n> +See also `grep.fallbackToNoIndex` in 'CONFIGURATION' below.\n> +\n>  --no-exclude-standard::\n>  \tAlso search in ignored files by not honoring the `.gitignore`\n>  \tmechanism. Only useful with `--untracked`.\n> @@ -248,8 +255,9 @@ providing this option will cause it to die.\n>  \ta non-zero status.\n>  \n>  --threads <num>::\n> -\tNumber of grep worker threads to use.\n> -\tSee `grep.threads` in 'CONFIGURATION' for more information.\n> +\tNumber of `grep` worker threads to use, to speed up searches.\n> +\tSee 'NOTES ON THREADS' and `grep.threads` in 'CONFIGURATION'\n> +\tfor more information.\n>  \n>  -f <file>::\n>  \tRead patterns from <file>, one per line.\n> @@ -336,9 +344,9 @@ The `--threads` option (and the `grep.threads` \nconfiguration) will be ignored wh\n>  `--open-files-in-pager` is used, forcing a single-threaded execution.\n>  \n>  When grepping the object store (with `--cached` or giving tree objects), \nrunning\n> -with multiple threads might perform slower than single threaded if `--\ntextconv`\n> -is given and there are too many text conversions. So if you experience low\n> -performance in this case, it might be desirable to use `--threads=1`.\n> +with multiple threads might perform slower than single-threaded if `--\ntextconv`\n> +is given and there are too many text conversions.  Thus, if low performance \nis\n> +experienced in this case, it might be desirable to use `--threads=1`.\n\nI'm not native speaker, but I'm not sure the switch to passive form is \nhelpful. In Simplified English, passive form is considered harmful and difficult \nto translate because the subject is elided.\n\n>  \n>  CONFIGURATION\n>  -------------\n> \n> \n\nOtherwise, thank you for helping converge to a more standardized format of \nmanpages.\n\n\n"},{"id":"491315","messageId":"ed050f2d496a6db07e698fd2f1094b81@manjaro.org","threadId":"61165","inReplyTo":"6056709.lOV4Wx5bFT@cayenne","subject":"Re: [PATCH 3/3] grep docs: describe --no-index further and improve formatting a bit","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2024-03-23T19:46:16Z","receivedAt":"2024-03-23T19:46:18Z","isPatch":true,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"Hello Jean-Noël,\n\nOn 2024-03-23 20:26, Jean-Noël AVILA wrote:\n> On Wednesday, 20 March 2024 22:08:46 CET Dragan Simic wrote:\n>> diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt\n>> index f64f40e9775a..b144401b3698 100644\n>> --- a/Documentation/git-grep.txt\n>> +++ b/Documentation/git-grep.txt\n>> @@ -28,7 +28,7 @@ SYNOPSIS\n>>  \t   [-f <file>] [-e] <pattern>\n>>  \t   [--and|--or|--not|(|)|-e <pattern>...]\n>>  \t   [--recurse-submodules] [--parent-basename <basename>]\n>> -\t   [ [--[no-]exclude-standard] [--cached | --no-index | --\n> untracked] | <tree>...]\n>> +\t   [ [--[no-]exclude-standard] [--cached | --untracked | --no-\n> index] | <tree>...]\n> \n> This change gives precedence to some option in alternatives, which \n> seems\n> weird.\n\nAs explained in the patch description, it isn't about the precedence,\nbut about grouping together the options that have something in common.\nIn more detail, --cached and --untracked have something in common,\ni.e. they both leave git-grep in the usual state, in which it treats\nthe directory as a local git repository, unlike --no-index that makes\ngit-grep treat the directory not as a git repository.\n\n>> @@ -45,13 +45,20 @@ OPTIONS\n>>  \tInstead of searching tracked files in the working tree, search\n>>  \tblobs registered in the index file.\n>> \n>> ---no-index::\n>> -\tSearch files in the current directory that is not managed by Git.\n>> -\n>>  --untracked::\n>>  \tIn addition to searching in the tracked files in the working\n>>  \ttree, search also in untracked files.\n>> \n>> +--no-index::\n>> +\tSearch files in the current directory that is not managed by Git,\n>> +\tor by ignoring that the current directory is managed by Git.  This\n>> +\tallows `git-grep(1)` to be used as the regular `grep(1)` utility,\n> \n> Auto-referencing the git-grep manpage in itself is useless.\n\nPlease note this isn't a link, it just mentions the operation.  Though,\nI agree that rewording it a bit might be beneficial.\n\n>>  When grepping the object store (with `--cached` or giving tree \n>> objects),\n> running\n>> -with multiple threads might perform slower than single threaded if \n>> `--\n> textconv`\n>> -is given and there are too many text conversions. So if you \n>> experience low\n>> -performance in this case, it might be desirable to use `--threads=1`.\n>> +with multiple threads might perform slower than single-threaded if \n>> `--\n> textconv`\n>> +is given and there are too many text conversions.  Thus, if low \n>> performance\n> is\n>> +experienced in this case, it might be desirable to use `--threads=1`.\n> \n> I'm not native speaker, but I'm not sure the switch to passive form is\n> helpful. In Simplified English, passive form is considered harmful and\n> difficult to translate because the subject is elided.\n\nIn general, not addressing the user/reader directly is preferred in\ntechnical documentation, because it eliminates the possible element\nof persuading the user to do something.  In other words, we should be\ntelling the user what our software can do, instead of telling the\nuser what to do.\n"}]}