summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.c3
-rw-r--r--src/stash.c2
-rw-r--r--src/tree.c1
3 files changed, 2 insertions, 4 deletions
diff --git a/src/index.c b/src/index.c
index 73fd40acf..ffa63f6a7 100644
--- a/src/index.c
+++ b/src/index.c
@@ -430,7 +430,6 @@ int git_index_read(git_index *index)
int git_index_write(git_index *index)
{
git_filebuf file = GIT_FILEBUF_INIT;
- struct stat indexst;
int error;
if (!index->index_file_path) {
@@ -473,7 +472,7 @@ int git_index_write_tree(git_oid *oid, git_index *index)
if (repo == NULL) {
giterr_set(GITERR_INDEX, "Failed to write tree. "
"The index file is not backed up by an existing repository");
- return -1
+ return -1;
}
return git_tree__write_index(oid, index, repo);
diff --git a/src/stash.c b/src/stash.c
index 9c9c5dce7..1d6940e3c 100644
--- a/src/stash.c
+++ b/src/stash.c
@@ -115,7 +115,7 @@ static int build_tree_from_index(git_tree **out, git_index *index)
{
git_oid i_tree_oid;
- if (git_tree_create_fromindex(&i_tree_oid, index) < 0)
+ if (git_index_write_tree(&i_tree_oid, index) < 0)
return -1;
return git_tree_lookup(out, git_index_owner(index), &i_tree_oid);
diff --git a/src/tree.c b/src/tree.c
index dd9f94869..46b4a6dd1 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -494,7 +494,6 @@ on_error:
int git_tree__write_index(git_oid *oid, git_index *index, git_repository *repo)
{
int ret;
- git_repository *repo;
assert(oid && index && repo);