Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-11-15 11:29:48 +0400
committerRussell Belfer <rb@github.com>2012-11-15 11:29:48 +0400
commitbbe6dbec81d2050fb52b600bc27e2dacdc780e77 (patch)
tree61f442146ed5b98352016f4ecec3ac4736e10c8c /src/stash.c
parentbad68c0a998116685ad75cab84210004dd2c5be1 (diff)
Add explicit git_index ptr to diff and checkout
A number of diff APIs and the `git_checkout_index` API take a `git_repository` object an operate on the index. This updates them to take a `git_index` pointer explicitly and only fall back on the `git_repository` index if the index input is NULL. This makes it easier to operate on a temporary index.
Diffstat (limited to 'src/stash.c')
-rw-r--r--src/stash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stash.c b/src/stash.c
index 2af3ca9fa..627d271f4 100644
--- a/src/stash.c
+++ b/src/stash.c
@@ -322,10 +322,10 @@ static int build_workdir_tree(
if (git_commit_tree(&b_tree, b_commit) < 0)
goto cleanup;
- if (git_diff_index_to_tree(&diff, repo, b_tree, &opts) < 0)
+ if (git_diff_index_to_tree(&diff, repo, b_tree, NULL, &opts) < 0)
goto cleanup;
- if (git_diff_workdir_to_index(&diff2, repo, &opts) < 0)
+ if (git_diff_workdir_to_index(&diff2, repo, NULL, &opts) < 0)
goto cleanup;
if (git_diff_merge(diff, diff2) < 0)