mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:03:23 +00:00
git-storage: add additional debug output
This helps the user figure out why we weren't able to write a tree. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2f8f6c4fa1
commit
f24cbbcb2c
1 changed files with 5 additions and 0 deletions
|
@ -1196,6 +1196,11 @@ static int write_git_tree(git_repository *repo, struct dir *tree, git_oid *resul
|
|||
|
||||
/* .. write out the resulting treebuilder */
|
||||
ret = git_treebuilder_write(result, tree->files);
|
||||
if (ret && verbose) {
|
||||
const git_error *gerr = giterr_last();
|
||||
if (gerr)
|
||||
fprintf(stderr, "tree_insert failed with return %d error %s\n", ret, gerr->message);
|
||||
}
|
||||
|
||||
/* .. and free the now useless treebuilder */
|
||||
git_treebuilder_free(tree->files);
|
||||
|
|
Loading…
Add table
Reference in a new issue