Thread (2 messages) 2 messages, 1 author, 2026-02-24
DORMANTno replies

[PATCH v2] builtin/repo.c: change info default behavior to show all fields

From: SoutrikDas <hidden>
Date: 2026-02-24 21:03:34
Subsystem: the rest · Maintainer: Linus Torvalds

 	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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help