mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	git storage: print the actual error
It seems silly to not show what git told us went wrong. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									6f20d1a208
								
							
						
					
					
						commit
						5269f8ce40
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -474,6 +474,12 @@ static int tree_insert(git_treebuilder *dir, const char *name, int mkunique, git | ||||||
| 	} | 	} | ||||||
| 	ret = git_treebuilder_insert(NULL, dir, name, id, mode); | 	ret = git_treebuilder_insert(NULL, dir, name, id, mode); | ||||||
| 	free_buffer(&uniquename); | 	free_buffer(&uniquename); | ||||||
|  | 	if (ret) { | ||||||
|  | 		const git_error *gerr = giterr_last(); | ||||||
|  | 		if (gerr) { | ||||||
|  | 			fprintf(stderr, "tree_insert failed with return %d error %s\n", ret, gerr->message); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
| 	return ret; | 	return ret; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue