mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									445dbe73bf
								
							
						
					
					
						commit
						1cb5419a57
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -634,6 +634,8 @@ static int save_one_picture(git_repository *repo, struct dir *dir, struct pictur | ||||||
| 	offset -= h *3600; | 	offset -= h *3600; | ||||||
| 	error = blob_insert(repo, dir, &buf, "%c%02u=%02u=%02u", | 	error = blob_insert(repo, dir, &buf, "%c%02u=%02u=%02u", | ||||||
| 		sign, h, FRACTION(offset, 60)); | 		sign, h, FRACTION(offset, 60)); | ||||||
|  | #if 0 | ||||||
|  | 	/* storing pictures into git was a mistake. This makes for HUGE git repositories */ | ||||||
| 	if (!error) { | 	if (!error) { | ||||||
| 		/* next store the actual picture; we prefix all picture names
 | 		/* next store the actual picture; we prefix all picture names
 | ||||||
| 		 * with "PIC-" to make things easier on the parsing side */ | 		 * with "PIC-" to make things easier on the parsing side */ | ||||||
|  | @ -643,6 +645,7 @@ static int save_one_picture(git_repository *repo, struct dir *dir, struct pictur | ||||||
| 		error = blob_insert_fromdisk(repo, dir, localfn, mb_cstring(&namebuf)); | 		error = blob_insert_fromdisk(repo, dir, localfn, mb_cstring(&namebuf)); | ||||||
| 		free((void *)localfn); | 		free((void *)localfn); | ||||||
| 	} | 	} | ||||||
|  | #endif | ||||||
| 	return error; | 	return error; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue