diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-11 08:24:58 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-11 08:24:58 +0200 |
commit | 65d69fe854ceeb65eeaed7f38a1f4a4771532b9d (patch) | |
tree | 55d6875d7962ba2bdd757dc5b604c365376a8737 /tests/commit | |
parent | fa934fabf76c06e843e9bb22d6679b3e882c3e4e (diff) | |
download | libgit2-65d69fe854ceeb65eeaed7f38a1f4a4771532b9d.tar.gz |
commit: ignore multiple author fieldscmn/double-author
Some tools create multiple author fields. git is rather lax when parsing
them, although fsck does complain about them. This means that they exist
in the wild.
As it's not too taxing to check for them, and there shouldn't be a
noticeable slowdown when dealing with correct commits, add logic to skip
over these extra fields when parsing the commit.
Diffstat (limited to 'tests/commit')
-rw-r--r-- | tests/commit/parse.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/commit/parse.c b/tests/commit/parse.c index 41e162440..fa079f470 100644 --- a/tests/commit/parse.c +++ b/tests/commit/parse.c @@ -262,6 +262,13 @@ gpgsig -----BEGIN PGP SIGNATURE-----\n\ -----END PGP SIGNATURE-----\n\ \n\ a simple commit which works\n", +/* some tools create two author entries */ +"tree 1810dff58d8a660512d4832e740f692884338ccd\n\ +author Vicent Marti <tanoku@gmail.com> 1273848544 +0200\n\ +author Helpful Coworker <helpful@coworker> 1273848544 +0200\n\ +committer Vicent Marti <tanoku@gmail.com> 1273848544 +0200\n\ +\n\ +a simple commit which works", }; static int parse_commit(git_commit **out, const char *buffer) |