diff options
author | Russell Belfer <rb@github.com> | 2012-11-15 11:29:48 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-11-15 11:29:48 +0400 |
commit | bbe6dbec81d2050fb52b600bc27e2dacdc780e77 (patch) | |
tree | 61f442146ed5b98352016f4ecec3ac4736e10c8c /src/stash.c | |
parent | bad68c0a998116685ad75cab84210004dd2c5be1 (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.c | 4 |
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) |