]> git.proxmox.com Git - libgit2.git/commit
refs: handle ALLOW_ONELEVEL normalization with leading slash
authorCarlos Martín Nieto <cmn@dwim.me>
Thu, 31 Jan 2013 19:23:30 +0000 (20:23 +0100)
committerCarlos Martín Nieto <cmn@dwim.me>
Thu, 31 Jan 2013 19:23:30 +0000 (20:23 +0100)
commite5ef0f18141409fc932d2c9cc0a42b769a880927
treeeef7f0e6b005913543a88be1c6db60a449197069
parent5f9f69d983d7ebc2d9d29cf295e86f32ab12906d
refs: handle ALLOW_ONELEVEL normalization with leading slash

A leading slash confuses the name normalization code when the flags
include ALLOW_ONELEVEL. Catch this case in particular to avoid
triggering an assertion in the uppercase check which expects us not to
pass it an empty string.

The existing tests don't catch this as they simply use the NORMAL
flag.

This fixes #1300.
src/refs.c
tests-clar/refs/isvalidname.c