public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: SoutrikDas <valusoutrik@gmail.com>
To: valusoutrik@gmail.com
Cc: ayu.chandekar@gmail.com, git@vger.kernel.org, jltobler@gmail.com,
	karthik.188@gmail.com, lucasseikioshiro@gmail.com,
	siddharthasthana31@gmail.com
Subject: [PATCH v2] builtin/repo.c: change info default behavior to show all fields
Date: Wed, 25 Feb 2026 02:33:18 +0530	[thread overview]
Message-ID: <20260224210318.16547-1-valusoutrik@gmail.com> (raw)
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


  reply	other threads:[~2026-02-24 21:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24 20:40 [RFC RFC PATCH] builtin/repo.c: change info default behavior to show all fields SoutrikDas
2026-02-24 21:03 ` SoutrikDas [this message]
2026-02-24 21:23 ` Junio C Hamano
2026-02-24 22:08   ` SoutrikDas
2026-02-25  0:14     ` K Jayatheerth
2026-02-25  2:44       ` Junio C Hamano
2026-02-25 15:34         ` SoutrikDas
2026-02-25 15:46           ` Junio C Hamano
2026-02-25 15:48           ` Kristoffer Haugsbakk
2026-02-25 17:02           ` JAYATHEERTH K
2026-02-25 15:11       ` Lucas Seiki Oshiro
2026-02-25 15:38         ` SoutrikDas
2026-02-25 15:31       ` SoutrikDas
2026-02-25 16:08         ` Lucas Seiki Oshiro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260224210318.16547-1-valusoutrik@gmail.com \
    --to=valusoutrik@gmail.com \
    --cc=ayu.chandekar@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jltobler@gmail.com \
    --cc=karthik.188@gmail.com \
    --cc=lucasseikioshiro@gmail.com \
    --cc=siddharthasthana31@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox