Skip to content

Commit

Permalink
remote: 'show' and 'prune' can take more than one remote
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
Thomas Rast authored and gitster committed Apr 24, 2013
1 parent 2d2e3d2 commit b17dd3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Documentation/git-remote.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 3 additions & 8 deletions t/t5505-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
"
Expand All @@ -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

0 comments on commit b17dd3f

Please sign in to comment.