From: Thomas Rast <trast@inf.ethz.ch>
To: <git@vger.kernel.org>
Subject: [PATCH 3/3] remote: 'show' and 'prune' take more than one remote
Date: Wed, 24 Apr 2013 15:54:37 +0200 [thread overview]
Message-ID: <3c40e8ca9d85f5254c2ba7d6a42e1d0d196e6faf.1366811347.git.trast@inf.ethz.ch> (raw)
In-Reply-To: <cover.1366811347.git.trast@inf.ethz.ch>
The 'git remote show' and 'prune' subcommands are documented as taking
only a single remote name argument, but that is not the case; they
will simply iterate the action over all remotes given. Update the
documentation and tests to match.
With the last user of the -f flag gone, we also remove the code
supporting it.
Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
---
Documentation/git-remote.txt | 4 ++--
t/t5505-remote.sh | 11 +++--------
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index e8c396b..7a6f354 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -18,8 +18,8 @@ SYNOPSIS
'git remote set-url' [--push] <name> <newurl> [<oldurl>]
'git remote set-url --add' [--push] <name> <newurl>
'git remote set-url --delete' [--push] <name> <url>
-'git remote' [-v | --verbose] 'show' [-n] <name>
-'git remote prune' [-n | --dry-run] <name>
+'git remote' [-v | --verbose] 'show' [-n] <name>...
+'git remote prune' [-n | --dry-run] <name>...
'git remote' [-v | --verbose] 'update' [-p | --prune] [(<group> | <remote>)...]
DESCRIPTION
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index eea87fc..dd10ff0 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -1009,12 +1009,7 @@ test_expect_success 'extra args: setup' '
'
test_extra_arg () {
- expect="success"
- if test "z$1" = "z-f"; then
- expect=failure
- shift
- fi
- test_expect_$expect "extra args: $*" "
+ test_expect_success "extra args: $*" "
test_must_fail git remote $* bogus_extra_arg 2>actual &&
grep '^usage:' actual
"
@@ -1026,8 +1021,8 @@ test_extra_arg remove origin
test_extra_arg set-head origin master
# set-branches takes any number of args
test_extra_arg set-url origin newurl oldurl
-test_extra_arg -f show origin
-test_extra_arg -f prune origin
+# show takes any number of args
+# prune takes any number of args
# update takes any number of args
test_done
--
1.8.2.1.931.g0116868
prev parent reply other threads:[~2013-04-24 13:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 13:54 [PATCH 0/3] git remote with superfluous arguments Thomas Rast
2013-04-24 13:54 ` [PATCH 1/3] remote: add a test for extra arguments, according to docs Thomas Rast
2013-04-24 21:37 ` Junio C Hamano
2013-04-25 7:23 ` Thomas Rast
2013-04-25 15:31 ` Junio C Hamano
2013-04-24 13:54 ` [PATCH 2/3] remote: check for superfluous arguments in 'git remote add' Thomas Rast
2013-04-24 13:54 ` Thomas Rast [this message]
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=3c40e8ca9d85f5254c2ba7d6a42e1d0d196e6faf.1366811347.git.trast@inf.ethz.ch \
--to=trast@inf.ethz.ch \
--cc=git@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).