summaryrefslogtreecommitdiffstats
path: root/save-git.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-03 23:14:20 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-06 09:37:19 -0800
commitd6b7ea5f7faf94cc67db53d3166fb717a2c5017a (patch)
treebaf44365bd7d43fff9850fcc623ca073ab4609f8 /save-git.c
parente4c7c6e8eb302cc21c1f643b397ae03c82b03f4b (diff)
downloadsubsurface-d6b7ea5f7faf94cc67db53d3166fb717a2c5017a.tar.gz
Cloud storage: do not store the actual pictures in git
Adding pictures to the repository was a big mistake on my part. It's very easy for the git repositories to reach a gigabyte and more making sync times (and especially "first download" times) completely unreasonable. This doesn't solve the problem for existing repositories (as the pictures are already there, in the git history), but at least it prevents us from storing more pictures out there. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'save-git.c')
-rw-r--r--save-git.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/save-git.c b/save-git.c
index 69ad0726d..b04348ec2 100644
--- a/save-git.c
+++ b/save-git.c
@@ -629,6 +629,8 @@ static int save_one_picture(git_repository *repo, struct dir *dir, struct pictur
offset -= h *3600;
error = 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 */
@@ -638,6 +640,7 @@ static int save_one_picture(git_repository *repo, struct dir *dir, struct pictur
error = blob_insert_fromdisk(repo, dir, localfn, mb_cstring(&namebuf));
free((void *)localfn);
}
+#endif
return error;
}