Skip to content

Commit f1ba1c9

Browse files
committed
Merge branch 'maint'
* maint: Documentation: receive.denyCurrentBranch defaults to 'refuse' bash: complete *_HEAD refs if present
2 parents 60dafdd + 7d182f5 commit f1ba1c9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Documentation/config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1453,7 +1453,7 @@ receive.denyCurrentBranch::
14531453
out of sync with the index and working tree. If set to "warn",
14541454
print a warning of such a push to stderr, but allow the push to
14551455
proceed. If set to false or "ignore", allow such pushes with no
1456-
message. Defaults to "warn".
1456+
message. Defaults to "refuse".
14571457

14581458
receive.denyNonFastForwards::
14591459
If set to true, git-receive-pack will deny a ref update which is

contrib/completion/git-completion.bash

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,9 @@ __git_refs ()
250250
refs="${cur%/*}"
251251
;;
252252
*)
253-
if [ -e "$dir/HEAD" ]; then echo HEAD; fi
253+
for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD; do
254+
if [ -e "$dir/$i" ]; then echo $i; fi
255+
done
254256
format="refname:short"
255257
refs="refs/tags refs/heads refs/remotes"
256258
;;

0 commit comments

Comments
 (0)