summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-03-17 14:24:08 -0700
committerJunio C Hamano <gitster@pobox.com>2010-03-17 14:24:08 -0700
commitf1ba1c90e1704e937ff59ee510a8d46a5ab52a1a (patch)
treeb793a66daa451a52f98f6b785ef3b4639f3184d9
parent60dafdd37d7df358b6ff67b317dbe738b50ea6d6 (diff)
parent7d182f52f1a754bdccb2e7c7cea54f773f76bc5c (diff)
downloadgit-f1ba1c90e1704e937ff59ee510a8d46a5ab52a1a.tar.gz
Merge branch 'maint'
* maint: Documentation: receive.denyCurrentBranch defaults to 'refuse' bash: complete *_HEAD refs if present
-rw-r--r--Documentation/config.txt2
-rwxr-xr-xcontrib/completion/git-completion.bash4
2 files changed, 4 insertions, 2 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index c80262bc37..805e0511ff 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1453,7 +1453,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
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"
;;