]> git.proxmox.com Git - libgit2.git/commit
fetchhead: deal with quotes in branch names
authorCarlos Martín Nieto <cmn@dwim.me>
Thu, 24 Apr 2014 12:08:29 +0000 (14:08 +0200)
committerCarlos Martín Nieto <cmn@dwim.me>
Thu, 24 Apr 2014 12:08:29 +0000 (14:08 +0200)
commitbdc82e1c00776229b19688abaf08d6701f2dc41f
tree0cb09f8ece8c243f1639440374dd20ed8f2e8cea
parent212b6205d70ff7c0f0f0b1eda6ac964c8d09d431
fetchhead: deal with quotes in branch names

The current FETCH_HEAD parsing code assumes that a quote must end the
branch name. Git however allows for quotes as part of a branch name,
which causes us to consider the FETCH_HEAD file as invalid.

Instead of searching for a single quote char, search for a quote char
followed by SP, which is not a valid part of a ref name.
src/fetchhead.c
tests/fetchhead/fetchhead_data.h
tests/fetchhead/nonetwork.c