remote: 'show' and 'prune' can take more than one remote

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> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thomas Rast committed Apr 24, 2013 at 15:54 UTC b17dd3f9d6b1657b3fbfb40a863fc2dce5f54798
2 files changed +5 -10
Documentation/git-remote.txt
+2 -2
@@ -18,8 +18,8 @@ SYNOPSIS
18 'git remote set-url' [--push] <name> <newurl> [<oldurl>]
19 'git remote set-url --add' [--push] <name> <newurl>
20 'git remote set-url --delete' [--push] <name> <url>
21 -'git remote' [-v | --verbose] 'show' [-n] <name>
22 -'git remote prune' [-n | --dry-run] <name>
21 +'git remote' [-v | --verbose] 'show' [-n] <name>...
22 +'git remote prune' [-n | --dry-run] <name>...
23 'git remote' [-v | --verbose] 'update' [-p | --prune] [(<group> | <remote>)...]
24
25 DESCRIPTION
t/t5505-remote.sh
+3 -8
@@ -1009,12 +1009,7 @@ test_expect_success 'extra args: setup' '
1009 '
1010
1011 test_extra_arg () {
1012 - expect="success"
1013 - if test "z$1" = "z-f"; then
1014 - expect=failure
1015 - shift
1016 - fi
1017 - test_expect_$expect "extra args: $*" "
1012 + test_expect_success "extra args: $*" "
1013 test_must_fail git remote $* bogus_extra_arg 2>actual &&
1014 grep '^usage:' actual
1015 "
@@ -1026,8 +1021,8 @@ test_extra_arg remove origin
1021 test_extra_arg set-head origin master
1022 # set-branches takes any number of args
1023 test_extra_arg set-url origin newurl oldurl
1029 -test_extra_arg -f show origin
1030 -test_extra_arg -f prune origin
1024 +# show takes any number of args
1025 +# prune takes any number of args
1026 # update takes any number of args
1027
1028 test_done