[PATCH] bash: offer refs instead of filenames for 'git revert'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The completion script for 'git revert' currently offers options and
filenames.  However, 'git revert' doesn't take any filenames from the
command line, but a single commit.  Therefore, it's more sane to offer
refs instead.

Signed-off-by: SZEDER Gábor <szeder@xxxxxxxxxx>
---
 contrib/completion/git-completion.bash |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 39bf18b..7e668d5 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1348,7 +1348,7 @@ _git_revert ()
 		return
 		;;
 	esac
-	COMPREPLY=()
+	__gitcomp "$(__git_refs)"
 }
 
 _git_rm ()
-- 
1.6.0.4.814.gfe502

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux