diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-04-14 06:51:43 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-04-15 07:58:10 -0700 |
commit | f24cbbcb2cf49ff52aa3c51090b77b60ec1cfc08 (patch) | |
tree | 59c6783f3d38c156b4e000f9f1d45f81b14a34bf /core | |
parent | 2f8f6c4fa104269eba824ae9c0e3f7d2d31db0d5 (diff) | |
download | subsurface-f24cbbcb2cf49ff52aa3c51090b77b60ec1cfc08.tar.gz |
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>
Diffstat (limited to 'core')
-rw-r--r-- | core/save-git.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/save-git.c b/core/save-git.c index 2d58f931a..6f1cc4646 100644 --- a/core/save-git.c +++ b/core/save-git.c @@ -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); |