From d23e7570a764d5e3fd033b7586bb4924d2774370 Mon Sep 17 00:00:00 2001 From: Ian Ward Comfort Date: Wed, 17 Mar 2010 02:20:35 -0700 Subject: [PATCH 1/2] bash: complete *_HEAD refs if present We already complete HEAD, of course, and might as well complete the other common refs mentioned in the rev-parse man page: FETCH_HEAD, ORIG_HEAD, and MERGE_HEAD. Signed-off-by: Ian Ward Comfort Acked-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index fe93747c93..733ac39a32 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -250,7 +250,9 @@ __git_refs () refs="${cur%/*}" ;; *) - if [ -e "$dir/HEAD" ]; then echo HEAD; fi + for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD; do + if [ -e "$dir/$i" ]; then echo $i; fi + done format="refname:short" refs="refs/tags refs/heads refs/remotes" ;; From 7d182f52f1a754bdccb2e7c7cea54f773f76bc5c Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Wed, 17 Mar 2010 12:14:57 +0100 Subject: [PATCH 2/2] Documentation: receive.denyCurrentBranch defaults to 'refuse' acd2a45 (Refuse updating the current branch in a non-bare repository via push, 2009-02-11) changed the default to refuse such a push, but it forgot to update the docs. Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- Documentation/config.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index 7103172ed3..437b4ac5ee 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1442,7 +1442,7 @@ receive.denyCurrentBranch:: out of sync with the index and working tree. If set to "warn", print a warning of such a push to stderr, but allow the push to proceed. If set to false or "ignore", allow such pushes with no - message. Defaults to "warn". + message. Defaults to "refuse". receive.denyNonFastForwards:: If set to true, git-receive-pack will deny a ref update which is