Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Wed, 17 Mar 2010 21:24:08 +0000 (14:24 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 Mar 2010 21:24:08 +0000 (14:24 -0700)
* maint:
Documentation: receive.denyCurrentBranch defaults to 'refuse'
bash: complete *_HEAD refs if present

Documentation/config.txt
contrib/completion/git-completion.bash
index c80262bc37065bc2f7fe16427df0940840614e45..805e0511ff06919f540b57432b6940689d2d5abc 100644 (file)
@@ -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
index fe93747c93a7b65f4657b56ef3962d64b48e3eb7..733ac39a32f6fd0b4f1546d429ac55c4ad6699b6 100755 (executable)
@@ -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"
                        ;;