summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/save-git.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/save-git.c b/core/save-git.c
index a00aeed94..1c68e9652 100644
--- a/core/save-git.c
+++ b/core/save-git.c
@@ -604,12 +604,15 @@ static int save_one_picture(git_repository *repo, struct dir *dir, struct pictur
int offset = pic->offset.seconds;
struct membuffer buf = { 0 };
char sign = '+';
+ char *hash;
unsigned h;
int error;
show_utf8(&buf, "filename ", pic->filename, "\n");
show_gps(&buf, pic->latitude, pic->longitude);
- show_utf8(&buf, "hash ", pic->hash, "\n");
+ hash = hashstring(pic->filename);
+ show_utf8(&buf, "hash ", hash, "\n");
+ free(hash);
/* Picture loading will load even negative offsets.. */
if (offset < 0) {