summaryrefslogtreecommitdiffstats
path: root/core/save-git.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-05-23 18:01:39 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-05-24 08:27:10 -0700
commit21ee440e5f96a2f7ddc810ced89f9ea1e7174bae (patch)
treeea40810cc8bb86ec149ab6968163fe8a368e66e3 /core/save-git.c
parent0958592ee6e0ea2016906d3fb84b64e3c20a90fa (diff)
downloadsubsurface-21ee440e5f96a2f7ddc810ced89f9ea1e7174bae.tar.gz
Cleanup: remove code related to picture-storage in git repositories
Saving of pictures to git repositories was disabled. Finally remove this code and the corresponding load code. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/save-git.c')
-rw-r--r--core/save-git.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/core/save-git.c b/core/save-git.c
index 23d26961f..9ed315028 100644
--- a/core/save-git.c
+++ b/core/save-git.c
@@ -611,7 +611,6 @@ static int save_one_picture(git_repository *repo, struct dir *dir, struct pictur
char sign = '+';
char *hash;
unsigned h;
- int error;
show_utf8(&buf, "filename ", pic->filename, "\n");
show_gps(&buf, pic->latitude, pic->longitude);
@@ -628,21 +627,8 @@ static int save_one_picture(git_repository *repo, struct dir *dir, struct pictur
/* Use full hh:mm:ss format to make it all sort nicely */
h = offset / 3600;
offset -= h *3600;
- error = blob_insert(repo, dir, &buf, "%c%02u=%02u=%02u",
+ return blob_insert(repo, dir, &buf, "%c%02u=%02u=%02u",
sign, h, FRACTION(offset, 60));
-#if 0
- /* storing pictures into git was a mistake. This makes for HUGE git repositories */
- if (!error) {
- /* next store the actual picture; we prefix all picture names
- * with "PIC-" to make things easier on the parsing side */
- struct membuffer namebuf = { 0 };
- const char *localfn = local_file_path(pic);
- put_format(&namebuf, "PIC-%s", pic->hash);
- error = blob_insert_fromdisk(repo, dir, localfn, mb_cstring(&namebuf));
- free((void *)localfn);
- }
-#endif
- return error;
}
static int save_pictures(git_repository *repo, struct dir *dir, struct dive *dive)