[PATCH v2] builtin/repo.c: change info default behavior to show all fields
- From
SoutrikDas <valusoutrik@gmail.com>
- Date
- Feb 24, 2026, 21:03 UTC
- Message-ID
- <20260224210318.16547-1-valusoutrik@gmail.com>
- In-Reply-To
- <20260224204047.8452-1-valusoutrik@gmail.com>
> if (all_keys) > return print_all_fields(repo, format); > + else if(!argc) > + return print_fields(argc, argv, repo, format);
I did not mean to send the above patch. It was a mistake. ---
Previously, git repo info would print nothing, when invoked without arguements. Change the default behaviour to display all available fields, to make it a little more user friendly.
Signed-off-by: SoutrikDas <valusoutrik@gmail.com> --- builtin/repo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/repo.c b/builtin/repo.c index 0ea045abc1..d044d83b14 100644 --- a/builtin/repo.c +++ b/builtin/repo.c @@ -191,7 +191,7 @@ static int cmd_repo_info(int argc, const char **argv, const char *prefix, if (all_keys && argc) die(_("--all and <key> cannot be used together")); - if (all_keys) + if (all_keys || !argc) return print_all_fields(repo, format); else return print_fields(argc, argv, repo, format);
-- 2.52.0