diff options
| author | Russell Belfer <rb@github.com> | 2012-11-13 13:58:29 -0800 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2012-11-14 22:54:31 -0800 |
| commit | 5735bf5e6ab4da347b601d4b85c09c5c701dc002 (patch) | |
| tree | a6a33b5234bba3ba293af13c91e435213a4223c5 /src/stash.c | |
| parent | 5a36f127808c7b470eef17b1a8a130dde0cc64a1 (diff) | |
| download | libgit2-5735bf5e6ab4da347b601d4b85c09c5c701dc002.tar.gz | |
Fix diff API to better parameter order
The diff API is not in the parameter order one would expect from
other libgit2 APIs. This fixes that.
Diffstat (limited to 'src/stash.c')
| -rw-r--r-- | src/stash.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/stash.c b/src/stash.c index 7bff466d1..2af3ca9fa 100644 --- a/src/stash.c +++ b/src/stash.c @@ -250,7 +250,7 @@ static int build_untracked_tree( if (git_commit_tree(&i_tree, i_commit) < 0) goto cleanup; - if (git_diff_workdir_to_tree(git_index_owner(index), &opts, i_tree, &diff) < 0) + if (git_diff_workdir_to_tree(&diff, git_index_owner(index), i_tree, &opts) < 0) goto cleanup; if (git_diff_foreach(diff, &data, update_index_cb, NULL, NULL) < 0) @@ -312,6 +312,7 @@ static int build_workdir_tree( git_index *index, git_commit *b_commit) { + git_repository *repo = git_index_owner(index); git_tree *b_tree = NULL; git_diff_list *diff = NULL, *diff2 = NULL; git_diff_options opts = {0}; @@ -321,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(git_index_owner(index), &opts, b_tree, &diff) < 0) + if (git_diff_index_to_tree(&diff, repo, b_tree, &opts) < 0) goto cleanup; - if (git_diff_workdir_to_index(git_index_owner(index), &opts, &diff2) < 0) + if (git_diff_workdir_to_index(&diff2, repo, &opts) < 0) goto cleanup; if (git_diff_merge(diff, diff2) < 0) |
