mirror of
https://github.com/git/git.git
synced 2024-05-06 05:16:15 +02:00
Merge branch 'jk/complete-branch-force-delete' into next
The command line completion (in contrib/) completed "git branch -d" with branch names, but "git branch -D" offered tagnames in addition, which has been corrected. * jk/complete-branch-force-delete: doc/git-branch: fix awkward wording for "-c" completion: handle other variants of "branch -m" completion: treat "branch -D" the same way as "branch -d"
This commit is contained in:
commit
6454bb89b5
|
@ -78,8 +78,8 @@ renaming. If <newbranch> exists, -M must be used to force the rename
|
||||||
to happen.
|
to happen.
|
||||||
|
|
||||||
The `-c` and `-C` options have the exact same semantics as `-m` and
|
The `-c` and `-C` options have the exact same semantics as `-m` and
|
||||||
`-M`, except instead of the branch being renamed it along with its
|
`-M`, except instead of the branch being renamed, it will be copied to a
|
||||||
config and reflog will be copied to a new name.
|
new name, along with its config and reflog.
|
||||||
|
|
||||||
With a `-d` or `-D` option, `<branchname>` will be deleted. You may
|
With a `-d` or `-D` option, `<branchname>` will be deleted. You may
|
||||||
specify more than one branch for deletion. If the branch currently
|
specify more than one branch for deletion. If the branch currently
|
||||||
|
|
|
@ -1447,8 +1447,10 @@ _git_branch ()
|
||||||
while [ $c -lt $cword ]; do
|
while [ $c -lt $cword ]; do
|
||||||
i="${words[c]}"
|
i="${words[c]}"
|
||||||
case "$i" in
|
case "$i" in
|
||||||
-d|--delete|-m|--move) only_local_ref="y" ;;
|
-d|-D|--delete|-m|-M|--move|-c|-C|--copy)
|
||||||
-r|--remotes) has_r="y" ;;
|
only_local_ref="y" ;;
|
||||||
|
-r|--remotes)
|
||||||
|
has_r="y" ;;
|
||||||
esac
|
esac
|
||||||
((c++))
|
((c++))
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue