From da60867ae3765dce3fbbfe85682e6157f9fd5ed7 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 13 Feb 2015 22:06:57 -0800 Subject: Always print dive site uuids as 8 digits / leading 0s in git format Otherwise there are ugly spaces in the file names. This didn't break anything, per se, it's mostly cosmetic. Signed-off-by: Dirk Hohndel --- save-git.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'save-git.c') diff --git a/save-git.c b/save-git.c index 2069b4c29..cf6bd37e9 100644 --- a/save-git.c +++ b/save-git.c @@ -388,7 +388,7 @@ static void create_dive_buffer(struct dive *dive, struct membuffer *b) SAVE("visibility", visibility); cond_put_format(dive->tripflag == NO_TRIP, b, "notrip\n"); save_tags(b, dive->tag_list); - cond_put_format(dive->dive_site_uuid, b, "divesiteid %8x\n", dive->dive_site_uuid); + cond_put_format(dive->dive_site_uuid, b, "divesiteid %08x\n", dive->dive_site_uuid); save_overview(b, dive); save_cylinder_info(b, dive); @@ -829,7 +829,7 @@ static void save_divesites(git_repository *repo, struct dir *tree) struct dive_site *ds = get_dive_site(i); int size = sizeof("Site-012345678"); char name[size]; - snprintf(name, size, "Site-%8x", ds->uuid); + snprintf(name, size, "Site-%08x", ds->uuid); show_utf8(&b, "name ", ds->name, "\n"); show_utf8(&b, "description ", ds->description, "\n"); show_utf8(&b, "notes ", ds->notes, "\n"); -- cgit v1.2.3-70-g09d2