1. Stefan Saasen
  2. git

Commits

Junio C Hamano  committed f9c2d2b Merge

Merge branch 'nd/maint-remote-remove' into maint

* nd/maint-remote-remove:
remote: prefer subcommand name 'remove' to 'rm'

  • Participants
  • Parent commits f2fef7b, e17dba8
  • Branches master

Comments (0)

Files changed (5)

File Documentation/git-remote.txt

View file
  • Ignore whitespace
 'git remote' [-v | --verbose]
 'git remote add' [-t <branch>] [-m <master>] [-f] [--tags|--no-tags] [--mirror=<fetch|push>] <name> <url>
 'git remote rename' <old> <new>
-'git remote rm' <name>
+'git remote remove' <name>
 'git remote set-head' <name> (-a | -d | <branch>)
 'git remote set-branches' [--add] <name> <branch>...
 'git remote set-url' [--push] <name> <newurl> [<oldurl>]
 `$GIT_DIR/remotes` or `$GIT_DIR/branches`, the remote is converted to
 the configuration file format.
 
+'remove'::
 'rm'::
 
 Remove the remote named <name>. All remote-tracking branches and

File builtin/remote.c

View file
  • Ignore whitespace
 	"git remote [-v | --verbose]",
 	"git remote add [-t <branch>] [-m <master>] [-f] [--tags|--no-tags] [--mirror=<fetch|push>] <name> <url>",
 	"git remote rename <old> <new>",
-	"git remote rm <name>",
+	"git remote remove <name>",
 	"git remote set-head <name> (-a | -d | <branch>)",
 	"git remote [-v | --verbose] show [-n] <name>",
 	"git remote prune [-n | --dry-run] <name>",
 };
 
 static const char * const builtin_remote_rm_usage[] = {
-	"git remote rm <name>",
+	"git remote remove <name>",
 	NULL
 };
 
 		result = add(argc, argv);
 	else if (!strcmp(argv[0], "rename"))
 		result = mv(argc, argv);
-	else if (!strcmp(argv[0], "rm"))
+	else if (!strcmp(argv[0], "rm") || !strcmp(argv[0], "remove"))
 		result = rm(argc, argv);
 	else if (!strcmp(argv[0], "set-head"))
 		result = set_head(argc, argv);

File contrib/completion/git-completion.bash

View file
  • Ignore whitespace
 
 _git_remote ()
 {
-	local subcommands="add rename rm set-head set-branches set-url show prune update"
+	local subcommands="add rename remove set-head set-branches set-url show prune update"
 	local subcommand="$(__git_find_on_cmdline "$subcommands")"
 	if [ -z "$subcommand" ]; then
 		__gitcomp "$subcommands"
 	fi
 
 	case "$subcommand" in
-	rename|rm|set-url|show|prune)
+	rename|remove|set-url|show|prune)
 		__gitcomp_nl "$(__git_remotes)"
 		;;
 	set-head|set-branches)

File t/t5505-remote.sh

View file
  • Ignore whitespace
 	} &&
 	git tag footag &&
 	git config --add remote.oops.fetch "+refs/*:refs/*" &&
-	git remote rm oops 2>actual1 &&
+	git remote remove oops 2>actual1 &&
 	git branch foobranch &&
 	git config --add remote.oops.fetch "+refs/*:refs/*" &&
 	git remote rm oops 2>actual2 &&
 	git clone one five &&
 	origin_url=$(pwd)/one &&
 	(cd five &&
-	 git remote rm origin &&
+	 git remote remove origin &&
 	 mkdir -p .git/remotes &&
 	 cat ../remotes_origin > .git/remotes/origin &&
 	 git remote rename origin origin &&

File t/t5540-http-push.sh

View file
  • Ignore whitespace
 	# By reset, we force git to retrieve the packed object
 	(cd "$ROOT_PATH"/test_repo_clone_packed &&
 	 git reset --hard HEAD^ &&
-	 git remote rm origin &&
+	 git remote remove origin &&
 	 git reflog expire --expire=0 --all &&
 	 git prune &&
 	 git push -f -v $HTTPD_URL/dumb/test_repo_packed.git master)