Skip to content

Commit 141ca95

Browse files
committed
Merge branch 'jk/remote-default-show'
* jk/remote-default-show: git-remote: show all remotes with "git remote show"
2 parents dc46fa3 + c4112bb commit 141ca95

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

builtin-remote.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ static const char * const builtin_remote_usage[] = {
1919

2020
static int verbose;
2121

22+
static int show_all(void);
23+
2224
static inline int postfixcmp(const char *string, const char *postfix)
2325
{
2426
int len1 = strlen(string), len2 = strlen(postfix);
@@ -384,8 +386,11 @@ static int show_or_prune(int argc, const char **argv, int prune)
384386

385387
argc = parse_options(argc, argv, options, builtin_remote_usage, 0);
386388

387-
if (argc < 1)
389+
if (argc < 1) {
390+
if (!prune)
391+
return show_all();
388392
usage_with_options(builtin_remote_usage, options);
393+
}
389394

390395
memset(&states, 0, sizeof(states));
391396
for (; argc; argc--, argv++) {

0 commit comments

Comments
 (0)