Merge branch 'jc/check-ref-format-oor'
authorJunio C Hamano <gitster@pobox.com>
Mon, 6 Nov 2017 05:24:28 +0000 (14:24 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Nov 2017 05:24:28 +0000 (14:24 +0900)
commit5a74ce22e61ce0c8d7325b891ef1a926cf4f6154
tree7c4c6d967be2268e7163e861f44c493642af42a8
parentf113d4bc799d4d0b751761db7d3760fcb9ba2c1a
parent89dd32aedcb52a77240f3923a687edc8a61662e7
Merge branch 'jc/check-ref-format-oor'

"git check-ref-format --branch @{-1}" bit a "BUG()" when run
outside a repository for obvious reasons; clarify the documentation
and make sure we do not even try to expand the at-mark magic in
such a case, but still call the validation logic for branch names.

* jc/check-ref-format-oor:
  check-ref-format doc: --branch validates and expands <branch>
  check-ref-format --branch: strip refs/heads/ using skip_prefix
  check-ref-format --branch: do not expand @{...} outside repository
builtin/check-ref-format.c
sha1_name.c