mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Remote storage: second attempt to fix build with older libgit2
That was embarrassing... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									64ba7f8683
								
							
						
					
					
						commit
						29e7459d6b
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -108,12 +108,14 @@ static git_repository *update_local_repo(const char *localdir, const char *remot | |||
| 	} | ||||
| 
 | ||||
| 	// NOTE! A fetch error is not fatal, we just report it
 | ||||
| 	git_fetch_options opts = GIT_FETCH_OPTIONS_INIT; | ||||
| #if USE_LIBGIT23_API | ||||
| 	git_fetch_options opts = GIT_FETCH_OPTIONS_INIT; | ||||
| 	if (strncmp(remote, "ssh://", 6) == 0) | ||||
| 		opts.callbacks.credentials = credential_cb; | ||||
| #endif | ||||
| 	error = git_remote_fetch(origin, NULL, &opts, NULL); | ||||
| #else | ||||
| 	error = git_remote_fetch(origin, NULL, NULL, NULL); | ||||
| #endif | ||||
| 	git_remote_free(origin); | ||||
| 	if (error) { | ||||
| 		report_error("Unable to update cache for remote '%s'", remote); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue