remote: 'show' and 'prune' can take more than one remote
authorThomas Rast <trast@inf.ethz.ch>
Wed, 24 Apr 2013 13:54:37 +0000 (15:54 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Apr 2013 20:13:21 +0000 (13:13 -0700)
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>
Documentation/git-remote.txt
t/t5505-remote.sh
index e8c396b5f92903777ce5905cf52e2ef879850739..7a6f3546803b8a6d71e44f5123a43397ace1f543 100644 (file)
@@ -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
index 07eb378922ac8fbfef715d30ab119f7f18f7950c..8b411eb66649f5a26c2f0e69a5c66cf3a97e30d3 100755 (executable)
@@ -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