diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-04-19 21:10:24 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-04-19 21:10:24 -0700 |
commit | 141ca95be1a751afe4ac2983593f1f7bcab87173 (patch) | |
tree | c85c681668a73ea0222198bdbead72fac23fd551 /builtin-remote.c | |
parent | dc46fa36b8dc407512fa41062caf57082a22907a (diff) | |
parent | c4112bb6bbc83708c7b54deac0928e66b4de2302 (diff) | |
download | git-141ca95be1a751afe4ac2983593f1f7bcab87173.tar.gz git-141ca95be1a751afe4ac2983593f1f7bcab87173.tar.xz |
Merge branch 'jk/remote-default-show'
* jk/remote-default-show:
git-remote: show all remotes with "git remote show"
Diffstat (limited to 'builtin-remote.c')
-rw-r--r-- | builtin-remote.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/builtin-remote.c b/builtin-remote.c index 8fe31dbd9..a3ee1ac39 100644 --- a/builtin-remote.c +++ b/builtin-remote.c @@ -19,6 +19,8 @@ static const char * const builtin_remote_usage[] = { static int verbose; +static int show_all(void); + static inline int postfixcmp(const char *string, const char *postfix) { int len1 = strlen(string), len2 = strlen(postfix); @@ -384,8 +386,11 @@ static int show_or_prune(int argc, const char **argv, int prune) argc = parse_options(argc, argv, options, builtin_remote_usage, 0); - if (argc < 1) + if (argc < 1) { + if (!prune) + return show_all(); usage_with_options(builtin_remote_usage, options); + } memset(&states, 0, sizeof(states)); for (; argc; argc--, argv++) { |