Allow creating new dive site with specific uuid

Test cases require deterministic results and thus we should allow uuid
to be specified when needed.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2015-07-24 19:53:21 +03:00 committed by Dirk Hohndel
parent 0d2d91a28c
commit 76fe262a0f
4 changed files with 10 additions and 7 deletions

View file

@ -1437,7 +1437,7 @@ static int parse_site_entry(git_repository *repo, const git_tree_entry *entry, c
{
if (*suffix == '\0')
return report_error("Dive site without uuid");
struct dive_site *ds = alloc_dive_site();
struct dive_site *ds = alloc_dive_site(0);
ds->uuid = strtoul(suffix, NULL, 16);
git_blob *blob = git_tree_entry_blob(repo, entry);
if (!blob)