{"thread":{"id":"64357","subject":"[PATCH v2 0/2] repo: add --all to repo-info","startedAt":"2025-10-20T18:20:00Z","lastAt":"2025-10-24T21:16:04Z","messageCount":6,"participants":["Lucas Seiki Oshiro","Patrick Steinhardt","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":2},"messages":[{"id":"529191","messageId":"20251020181943.6314-1-lucasseikioshiro@gmail.com","threadId":"64357","inReplyTo":null,"subject":"[PATCH v2 0/2] repo: add --all to repo-info","fromName":"Lucas Seiki Oshiro","fromEmail":"lucasseikioshiro@gmail.com","sentAt":"2025-10-20T16:19:45Z","receivedAt":"2025-10-20T18:20:00Z","isPatch":true,"sender":{"key":"lucasseikioshiro@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701580?v=4"},"body":"Hi!\n\nThe main change introduced in this v2 is that now \n`git repo info --all <some.key>` returns the values for all the\navailable keys plus the value of `<some.key>` (which will be\nduplicated). If `<some.key>` is an invalid key, the command will proceed\nthe same way that it would do without the `--all` flag.\n\nPS: Sorry for sending this v2 after a month. I've been really busy last\nweeks, but I still want to finish this :-)\n\nHere's the rangediff against v1:\n\n-:  ---------- > 1:  5f72f07589 repo: factor out field printing to dedicated function\n1:  94c7b835f0 ! 2:  b8158bb7b8 repo: add --all to git-repo-info\n    @@ Metadata\n      ## Commit message ##\n         repo: add --all to git-repo-info\n     \n    -    Add a new flag `--all` to git-repo-info for requesting all the available\n    -    keys. By using this flag, the user can retrieve all the values instead\n    -    of searching what are the desired keys for what they wants.\n    +    Add a new flag `--all` to git-repo-info for requesting values for all\n    +    the available keys. By using this flag, the user can retrieve all the\n    +    values instead of searching what are the desired keys for what they\n    +    wants.\n     \n         Helped-by: Karthik Nayak <karthik.188@gmail.com>\n         Helped-by: Patrick Steinhardt <ps@pks.im>\n    @@ Documentation/git-repo.adoc: git-repo - Retrieve information about the repositor\n      --------\n      [synopsis]\n     -git repo info [--format=(keyvalue|nul)] [-z] [<key>...]\n    -+git repo info [--format=(keyvalue|nul)] [-z] [--all] [<key>...]\n    ++git repo info [--format=(keyvalue|nul)] [-z] [--all | <key>...]\n      \n      DESCRIPTION\n      -----------\n    @@ Documentation/git-repo.adoc: THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHAN\n      COMMANDS\n      --------\n     -`info [--format=(keyvalue|nul)] [-z] [<key>...]`::\n    -+`info [--format=(keyvalue|nul)] [-z] [--all] [<key>...]`::\n    ++`info [--format=(keyvalue|nul)] [-z] [--all | <key>...]`::\n      \tRetrieve metadata-related information about the current repository. Only\n      \tthe requested data will be returned based on their keys (see \"INFO KEYS\"\n      \tsection below).\n      +\n      The values are returned in the same order in which their respective keys were\n     -requested.\n    -+requested. The `--all` flag requests all keys.\n    ++requested. The `--all` flag requests the values for all the available keys.\n    ++Keys requested after `--all` will be duplicated.\n      +\n      The output format can be chosen through the flag `--format`. Two formats are\n      supported:\n    @@ builtin/repo.c\n      \n      static const char *const repo_usage[] = {\n     -\t\"git repo info [--format=(keyvalue|nul)] [-z] [<key>...]\",\n    -+\t\"git repo info [--format=(keyvalue|nul)] [-z] [--all] [<key>...]\",\n    ++\t\"git repo info [--format=(keyvalue|nul)] [-z] [--all | <key>...]\",\n      \tNULL\n      };\n      \n    -@@ builtin/repo.c: static get_value_fn *get_value_fn_for_key(const char *key)\n    - \treturn found ? found->get_value : NULL;\n    - }\n    - \n    -+static void print_field(enum output_format format, const char *key,\n    -+\t\t\tstruct strbuf *valbuf, struct strbuf *quotbuf)\n    -+{\n    -+\tstrbuf_reset(quotbuf);\n    -+\n    -+\tswitch (format) {\n    -+\tcase FORMAT_KEYVALUE:\n    -+\t\tquote_c_style(valbuf->buf, quotbuf, NULL, 0);\n    -+\t\tprintf(\"%s=%s\\n\", key, quotbuf->buf);\n    -+\t\tbreak;\n    -+\tcase FORMAT_NUL_TERMINATED:\n    -+\t\tprintf(\"%s\\n%s%c\", key, valbuf->buf, '\\0');\n    -+\t\tbreak;\n    -+\tdefault:\n    -+\t\tBUG(\"not a valid output format: %d\", format);\n    -+\t}\n    -+}\n    -+\n    - static int print_fields(int argc, const char **argv,\n    - \t\t\tstruct repository *repo,\n    - \t\t\tenum output_format format)\n    -@@ builtin/repo.c: static int print_fields(int argc, const char **argv,\n    - \t\t}\n    - \n    - \t\tstrbuf_reset(&valbuf);\n    --\t\tstrbuf_reset(&quotbuf);\n    --\n    - \t\tget_value(repo, &valbuf);\n    --\n    --\t\tswitch (format) {\n    --\t\tcase FORMAT_KEYVALUE:\n    --\t\t\tquote_c_style(valbuf.buf, &quotbuf, NULL, 0);\n    --\t\t\tprintf(\"%s=%s\\n\", key, quotbuf.buf);\n    --\t\t\tbreak;\n    --\t\tcase FORMAT_NUL_TERMINATED:\n    --\t\t\tprintf(\"%s\\n%s%c\", key, valbuf.buf, '\\0');\n    --\t\t\tbreak;\n    --\t\tdefault:\n    --\t\t\tBUG(\"not a valid output format: %d\", format);\n    --\t\t}\n    -+\t\tprint_field(format, key, &valbuf, &quotbuf);\n    - \t}\n    - \n    - \tstrbuf_release(&valbuf);\n     @@ builtin/repo.c: static int print_fields(int argc, const char **argv,\n      \treturn ret;\n      }\n    @@ builtin/repo.c: static int repo_info(int argc, const char **argv, const char *pr\n      \n      \targc = parse_options(argc, argv, prefix, options, repo_usage, 0);\n      \n    -+\tif (all_keys) {\n    ++\tif (all_keys)\n     +\t\tprint_all_fields(repo, format);\n    -+\t\treturn 0;\n    -+\t}\n     +\n      \treturn print_fields(argc, argv, repo, format);\n      }\n      \n     \n      ## t/t1900-repo.sh ##\n    +@@ t/t1900-repo.sh: test_description='test git repo-info'\n    + \n    + . ./test-lib.sh\n    + \n    ++# git-repo-info keys. It must contain the same keys listed in the const\n    ++# repo_info_fields, in lexicographical order.\n    ++REPO_INFO_KEYS='\n    ++\tlayout.bare\n    ++\tlayout.shallow\n    ++\tobject.format\n    ++\treferences.format\n    ++'\n    ++\n    + # Test whether a key-value pair is correctly returned\n    + #\n    + # Usage: test_repo_info <label> <init command> <repo_name> <key> <expected value>\n     @@ t/t1900-repo.sh: test_expect_success 'git repo info uses the last requested format' '\n      \ttest_cmp expected actual\n      '\n      \n    -+test_expect_success 'git repo info --all returns all fields' '\n    -+\tgit repo info layout.bare layout.shallow object.format references.format >expect &&\n    ++test_expect_success 'git repo info --all returns all key-value pairs' '\n    ++\tgit repo info $REPO_INFO_KEYS >expect &&\n     +\tgit repo info --all >actual &&\n     +\ttest_cmp expect actual\n     +'\n    ++\n    ++test_expect_success 'git repo info --all <key> duplicates <key>' '\n    ++\tgit repo info $REPO_INFO_KEYS object.format >expect &&\n    ++\tgit repo info --all object.format >actual &&\n    ++\ttest_cmp expect actual\n    ++'\n    ++\n    ++test_expect_success 'git repo info --all <invalid key> warns about invalid key' '\n    ++\tgit repo info $REPO_INFO_KEYS >expect &&\n    ++\techo \"error: key ${SQ}no.key${SQ} not found\" >expect_err &&\n    ++\ttest_must_fail git repo info --all no.key >actual 2>actual_err &&\n    ++\ttest_cmp expect actual &&\n    ++\ttest_cmp expect_err actual_err\n    ++'\n     +\n      test_done\n\nLucas Seiki Oshiro (2):\n  repo: factor out field printing to dedicated function\n  repo: add --all to git-repo-info\n\n Documentation/git-repo.adoc |  7 +++--\n builtin/repo.c              | 60 +++++++++++++++++++++++++++----------\n t/t1900-repo.sh             | 29 ++++++++++++++++++\n 3 files changed, 78 insertions(+), 18 deletions(-)\n\n-- \n2.50.1 (Apple Git-155)\n\n"},{"id":"529192","messageId":"20251020181943.6314-2-lucasseikioshiro@gmail.com","threadId":"64357","inReplyTo":"20251020181943.6314-1-lucasseikioshiro@gmail.com","subject":"[PATCH v2 1/2] repo: factor out field printing to dedicated function","fromName":"Lucas Seiki Oshiro","fromEmail":"lucasseikioshiro@gmail.com","sentAt":"2025-10-20T16:19:46Z","receivedAt":"2025-10-20T18:20:02Z","isPatch":true,"sender":{"key":"lucasseikioshiro@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701580?v=4"},"body":"Move the field printing in git-repo-info to a new function called\n`print_field`, allowing it to be called by functions other than\n`print_fields`.\n\nSigned-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>\n---\n builtin/repo.c | 33 +++++++++++++++++++--------------\n 1 file changed, 19 insertions(+), 14 deletions(-)\n\ndiff --git a/builtin/repo.c b/builtin/repo.c\nindex bbb0966f2d..3b071e9a50 100644\n--- a/builtin/repo.c\n+++ b/builtin/repo.c\n@@ -77,6 +77,24 @@ static get_value_fn *get_value_fn_for_key(const char *key)\n \treturn found ? found->get_value : NULL;\n }\n \n+static void print_field(enum output_format format, const char *key,\n+\t\t\tstruct strbuf *valbuf, struct strbuf *quotbuf)\n+{\n+\tstrbuf_reset(quotbuf);\n+\n+\tswitch (format) {\n+\tcase FORMAT_KEYVALUE:\n+\t\tquote_c_style(valbuf->buf, quotbuf, NULL, 0);\n+\t\tprintf(\"%s=%s\\n\", key, quotbuf->buf);\n+\t\tbreak;\n+\tcase FORMAT_NUL_TERMINATED:\n+\t\tprintf(\"%s\\n%s%c\", key, valbuf->buf, '\\0');\n+\t\tbreak;\n+\tdefault:\n+\t\tBUG(\"not a valid output format: %d\", format);\n+\t}\n+}\n+\n static int print_fields(int argc, const char **argv,\n \t\t\tstruct repository *repo,\n \t\t\tenum output_format format)\n@@ -97,21 +115,8 @@ static int print_fields(int argc, const char **argv,\n \t\t}\n \n \t\tstrbuf_reset(&valbuf);\n-\t\tstrbuf_reset(&quotbuf);\n-\n \t\tget_value(repo, &valbuf);\n-\n-\t\tswitch (format) {\n-\t\tcase FORMAT_KEYVALUE:\n-\t\t\tquote_c_style(valbuf.buf, &quotbuf, NULL, 0);\n-\t\t\tprintf(\"%s=%s\\n\", key, quotbuf.buf);\n-\t\t\tbreak;\n-\t\tcase FORMAT_NUL_TERMINATED:\n-\t\t\tprintf(\"%s\\n%s%c\", key, valbuf.buf, '\\0');\n-\t\t\tbreak;\n-\t\tdefault:\n-\t\t\tBUG(\"not a valid output format: %d\", format);\n-\t\t}\n+\t\tprint_field(format, key, &valbuf, &quotbuf);\n \t}\n \n \tstrbuf_release(&valbuf);\n-- \n2.50.1 (Apple Git-155)\n\n"},{"id":"529193","messageId":"20251020181943.6314-3-lucasseikioshiro@gmail.com","threadId":"64357","inReplyTo":"20251020181943.6314-1-lucasseikioshiro@gmail.com","subject":"[PATCH v2 2/2] repo: add --all to git-repo-info","fromName":"Lucas Seiki Oshiro","fromEmail":"lucasseikioshiro@gmail.com","sentAt":"2025-10-20T16:19:47Z","receivedAt":"2025-10-20T18:20:05Z","isPatch":true,"sender":{"key":"lucasseikioshiro@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701580?v=4"},"body":"Add a new flag `--all` to git-repo-info for requesting values for all\nthe available keys. By using this flag, the user can retrieve all the\nvalues instead of searching what are the desired keys for what they\nwants.\n\nHelped-by: Karthik Nayak <karthik.188@gmail.com>\nHelped-by: Patrick Steinhardt <ps@pks.im>\nSigned-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>\n---\n Documentation/git-repo.adoc |  7 ++++---\n builtin/repo.c              | 27 ++++++++++++++++++++++++++-\n t/t1900-repo.sh             | 29 +++++++++++++++++++++++++++++\n 3 files changed, 59 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-repo.adoc b/Documentation/git-repo.adoc\nindex 209afd1b61..1a9d0c50a9 100644\n--- a/Documentation/git-repo.adoc\n+++ b/Documentation/git-repo.adoc\n@@ -8,7 +8,7 @@ git-repo - Retrieve information about the repository\n SYNOPSIS\n --------\n [synopsis]\n-git repo info [--format=(keyvalue|nul)] [-z] [<key>...]\n+git repo info [--format=(keyvalue|nul)] [-z] [--all | <key>...]\n \n DESCRIPTION\n -----------\n@@ -18,13 +18,14 @@ THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.\n \n COMMANDS\n --------\n-`info [--format=(keyvalue|nul)] [-z] [<key>...]`::\n+`info [--format=(keyvalue|nul)] [-z] [--all | <key>...]`::\n \tRetrieve metadata-related information about the current repository. Only\n \tthe requested data will be returned based on their keys (see \"INFO KEYS\"\n \tsection below).\n +\n The values are returned in the same order in which their respective keys were\n-requested.\n+requested. The `--all` flag requests the values for all the available keys.\n+Keys requested after `--all` will be duplicated.\n +\n The output format can be chosen through the flag `--format`. Two formats are\n supported:\ndiff --git a/builtin/repo.c b/builtin/repo.c\nindex 3b071e9a50..1c54db5810 100644\n--- a/builtin/repo.c\n+++ b/builtin/repo.c\n@@ -9,7 +9,7 @@\n #include \"shallow.h\"\n \n static const char *const repo_usage[] = {\n-\t\"git repo info [--format=(keyvalue|nul)] [-z] [<key>...]\",\n+\t\"git repo info [--format=(keyvalue|nul)] [-z] [--all | <key>...]\",\n \tNULL\n };\n \n@@ -124,6 +124,26 @@ static int print_fields(int argc, const char **argv,\n \treturn ret;\n }\n \n+static void print_all_fields(struct repository *repo,\n+\t\t\t     enum output_format format)\n+{\n+\tstruct strbuf valbuf = STRBUF_INIT;\n+\tstruct strbuf quotbuf = STRBUF_INIT;\n+\n+\tfor (unsigned long i = 0; i < ARRAY_SIZE(repo_info_fields); i++) {\n+\t\tstruct field field = repo_info_fields[i];\n+\t\tget_value_fn *get_value = field.get_value;\n+\t\tconst char *key = field.key;\n+\n+\t\tstrbuf_reset(&valbuf);\n+\t\tget_value(repo, &valbuf);\n+\t\tprint_field(format, key, &valbuf, &quotbuf);\n+\t}\n+\n+\tstrbuf_release(&valbuf);\n+\tstrbuf_release(&quotbuf);\n+}\n+\n static int parse_format_cb(const struct option *opt,\n \t\t\t   const char *arg, int unset UNUSED)\n {\n@@ -145,6 +165,7 @@ static int repo_info(int argc, const char **argv, const char *prefix,\n \t\t     struct repository *repo)\n {\n \tenum output_format format = FORMAT_KEYVALUE;\n+\tint all_keys = 0;\n \tstruct option options[] = {\n \t\tOPT_CALLBACK_F(0, \"format\", &format, N_(\"format\"),\n \t\t\t       N_(\"output format\"),\n@@ -153,11 +174,15 @@ static int repo_info(int argc, const char **argv, const char *prefix,\n \t\t\t       N_(\"synonym for --format=nul\"),\n \t\t\t       PARSE_OPT_NONEG | PARSE_OPT_NOARG,\n \t\t\t       parse_format_cb),\n+\t\tOPT_BOOL(0, \"all\", &all_keys, N_(\"return all keys\")),\n \t\tOPT_END()\n \t};\n \n \targc = parse_options(argc, argv, prefix, options, repo_usage, 0);\n \n+\tif (all_keys)\n+\t\tprint_all_fields(repo, format);\n+\n \treturn print_fields(argc, argv, repo, format);\n }\n \ndiff --git a/t/t1900-repo.sh b/t/t1900-repo.sh\nindex 2beba67889..28635d0f92 100755\n--- a/t/t1900-repo.sh\n+++ b/t/t1900-repo.sh\n@@ -4,6 +4,15 @@ test_description='test git repo-info'\n \n . ./test-lib.sh\n \n+# git-repo-info keys. It must contain the same keys listed in the const\n+# repo_info_fields, in lexicographical order.\n+REPO_INFO_KEYS='\n+\tlayout.bare\n+\tlayout.shallow\n+\tobject.format\n+\treferences.format\n+'\n+\n # Test whether a key-value pair is correctly returned\n #\n # Usage: test_repo_info <label> <init command> <repo_name> <key> <expected value>\n@@ -110,4 +119,24 @@ test_expect_success 'git repo info uses the last requested format' '\n \ttest_cmp expected actual\n '\n \n+test_expect_success 'git repo info --all returns all key-value pairs' '\n+\tgit repo info $REPO_INFO_KEYS >expect &&\n+\tgit repo info --all >actual &&\n+\ttest_cmp expect actual\n+'\n+\n+test_expect_success 'git repo info --all <key> duplicates <key>' '\n+\tgit repo info $REPO_INFO_KEYS object.format >expect &&\n+\tgit repo info --all object.format >actual &&\n+\ttest_cmp expect actual\n+'\n+\n+test_expect_success 'git repo info --all <invalid key> warns about invalid key' '\n+\tgit repo info $REPO_INFO_KEYS >expect &&\n+\techo \"error: key ${SQ}no.key${SQ} not found\" >expect_err &&\n+\ttest_must_fail git repo info --all no.key >actual 2>actual_err &&\n+\ttest_cmp expect actual &&\n+\ttest_cmp expect_err actual_err\n+'\n+\n test_done\n-- \n2.50.1 (Apple Git-155)\n\n"},{"id":"529217","messageId":"aPcduvnjD0yphja2@pks.im","threadId":"64357","inReplyTo":"20251020181943.6314-3-lucasseikioshiro@gmail.com","subject":"Re: [PATCH v2 2/2] repo: add --all to git-repo-info","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-10-21T05:44:26Z","receivedAt":"2025-10-21T05:44:32Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Mon, Oct 20, 2025 at 01:19:47PM -0300, Lucas Seiki Oshiro wrote:\n> diff --git a/Documentation/git-repo.adoc b/Documentation/git-repo.adoc\n> index 209afd1b61..1a9d0c50a9 100644\n> --- a/Documentation/git-repo.adoc\n> +++ b/Documentation/git-repo.adoc\n> @@ -8,7 +8,7 @@ git-repo - Retrieve information about the repository\n>  SYNOPSIS\n>  --------\n>  [synopsis]\n> -git repo info [--format=(keyvalue|nul)] [-z] [<key>...]\n> +git repo info [--format=(keyvalue|nul)] [-z] [--all | <key>...]\n>  \n>  DESCRIPTION\n>  -----------\n> @@ -18,13 +18,14 @@ THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.\n>  \n>  COMMANDS\n>  --------\n> -`info [--format=(keyvalue|nul)] [-z] [<key>...]`::\n> +`info [--format=(keyvalue|nul)] [-z] [--all | <key>...]`::\n>  \tRetrieve metadata-related information about the current repository. Only\n>  \tthe requested data will be returned based on their keys (see \"INFO KEYS\"\n>  \tsection below).\n>  +\n>  The values are returned in the same order in which their respective keys were\n> -requested.\n> +requested. The `--all` flag requests the values for all the available keys.\n> +Keys requested after `--all` will be duplicated.\n>  +\n>  The output format can be chosen through the flag `--format`. Two formats are\n>  supported:\n\nThe synopsis now disagrees with the new behaviour, as it looks as if you\ncan pick either \"--all\" or a set of keys. But we now support both at the\nsame time.\n\nI know Junio mentioned this as one of the ways this may operate, and\nsaid that accepting both is the \"most logical\". I personally don't quite\nagree, and think that having it be either or is a bit saner. After all,\nwhat is the use case for listing specific keys twice? I cannot really\nsee why one would ever want that. So I think we should accept either\n`--all` or keys, and die if they are used in combination.\n\nIf Junio continues to prefer the version you have here then so be it.\nBut in that case you'll have to fix the synopsis to reflect that.\n\n> diff --git a/t/t1900-repo.sh b/t/t1900-repo.sh\n> index 2beba67889..28635d0f92 100755\n> --- a/t/t1900-repo.sh\n> +++ b/t/t1900-repo.sh\n> @@ -110,4 +119,24 @@ test_expect_success 'git repo info uses the last requested format' '\n>  \ttest_cmp expected actual\n>  '\n>  \n> +test_expect_success 'git repo info --all returns all key-value pairs' '\n> +\tgit repo info $REPO_INFO_KEYS >expect &&\n> +\tgit repo info --all >actual &&\n> +\ttest_cmp expect actual\n> +'\n> +\n> +test_expect_success 'git repo info --all <key> duplicates <key>' '\n> +\tgit repo info $REPO_INFO_KEYS object.format >expect &&\n> +\tgit repo info --all object.format >actual &&\n> +\ttest_cmp expect actual\n> +'\n> +\n> +test_expect_success 'git repo info --all <invalid key> warns about invalid key' '\n> +\tgit repo info $REPO_INFO_KEYS >expect &&\n> +\techo \"error: key ${SQ}no.key${SQ} not found\" >expect_err &&\n> +\ttest_must_fail git repo info --all no.key >actual 2>actual_err &&\n> +\ttest_cmp expect actual &&\n> +\ttest_cmp expect_err actual_err\n> +'\n\nYeah, these don't quite convince me that using them in combination is\nsensible :) In fact, there is one more argument against this here: in\nthe current form, the order in which we print the key-value pairs\ndepends on the order in which they are specified on the command line.\nSo far so good.\n\nBut with `--all` that's not the case anymore, as we unconditionally\nprint all pairs before the individual keys. So `git repo info --all\n<key>` produces the same output as `git repo info <key> --all`. Now\nwe're in a mode where only _parts_ of the output depends on the order of\nour command line arguments, which is inconsistent.\n\nSo... yeah, I think accepting either or is the more sensible approach.\nThere is no use case for printing keys twice, and if we do then we have\nsome weird inconsistencies in the ordering.\n\nThanks!\n\nPatrick\n"},{"id":"529270","messageId":"xmqqms5kxtcq.fsf@gitster.g","threadId":"64357","inReplyTo":"aPcduvnjD0yphja2@pks.im","subject":"Re: [PATCH v2 2/2] repo: add --all to git-repo-info","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-10-21T13:44:05Z","receivedAt":"2025-10-21T13:44:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n>> +`info [--format=(keyvalue|nul)] [-z] [--all | <key>...]`::\n> ...\n> The synopsis now disagrees with the new behaviour, as it looks as if you\n> can pick either \"--all\" or a set of keys. But we now support both at the\n> same time.\n>\n> I know Junio mentioned this as one of the ways this may operate, and\n> said that accepting both is the \"most logical\". I personally don't quite\n> agree, and think that having it be either or is a bit saner. After all,\n> what is the use case for listing specific keys twice? I cannot really\n> see why one would ever want that. So I think we should accept either\n> `--all` or keys, and die if they are used in combination.\n\nYup, unless we declare that the order of output is unspecified when\n\"--all\" is used (regardless of the presense of explicitly given\nkeys), it would become awkweard to define the output behaviour.  So\nI am OK to make the command behave as specified in the synopsis\nsection.\n\nThanks.\n"},{"id":"529638","messageId":"CC193689-1CFC-4682-95A1-2303642EA8C0@gmail.com","threadId":"64357","inReplyTo":"aPcduvnjD0yphja2@pks.im","subject":"Re: [PATCH v2 2/2] repo: add --all to git-repo-info","fromName":"Lucas Seiki Oshiro","fromEmail":"lucasseikioshiro@gmail.com","sentAt":"2025-10-24T21:15:50Z","receivedAt":"2025-10-24T21:16:04Z","isPatch":true,"sender":{"key":"lucasseikioshiro@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701580?v=4"},"body":"\n> So I think we should accept either `--all` or keys, and die if they are\n> used in combination.\n\nYeah, it makes sense. I'll change it in v3.\n\nThanks!\n"}]}