diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2014-04-24 14:08:29 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-04-24 14:08:29 +0200 |
| commit | bdc82e1c00776229b19688abaf08d6701f2dc41f (patch) | |
| tree | 0cb09f8ece8c243f1639440374dd20ed8f2e8cea /tests/fetchhead/fetchhead_data.h | |
| parent | 212b6205d70ff7c0f0f0b1eda6ac964c8d09d431 (diff) | |
| download | libgit2-bdc82e1c00776229b19688abaf08d6701f2dc41f.tar.gz | |
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.
Diffstat (limited to 'tests/fetchhead/fetchhead_data.h')
| -rw-r--r-- | tests/fetchhead/fetchhead_data.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/fetchhead/fetchhead_data.h b/tests/fetchhead/fetchhead_data.h index 34adb3d08..94402abd5 100644 --- a/tests/fetchhead/fetchhead_data.h +++ b/tests/fetchhead/fetchhead_data.h @@ -28,3 +28,6 @@ #define FETCH_HEAD_EXPLICIT_DATA \ "0966a434eb1a025db6b71485ab63a3bfbea520b6\t\tbranch 'first-merge' of git://github.com/libgit2/TestGitRepository\n" + +#define FETCH_HEAD_QUOTE_DATA \ + "0966a434eb1a025db6b71485ab63a3bfbea520b6\t\tbranch 'first's-merge' of git://github.com/libgit2/TestGitRepository\n" |
