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-21 04:36:06 +0400
committerBen Straub <bs@github.com>2012-11-28 01:18:28 +0400
commit793c4385597d0786242e17c8ef37cdfa83f1865c (patch)
tree22e9b48db487577d865a174bc5b21a13a176c78f /src/stash.c
parent54b2a37ac7715c74e5b06b76eb2b631987d7b6f8 (diff)
Update diff callback param order
This makes the diff functions that take callbacks both take the payload parameter after the callback function pointers and pass the payload as the last argument to the callback function instead of the first. This should make them consistent with other callbacks across the API.
Diffstat (limited to 'src/stash.c')
-rw-r--r--src/stash.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/stash.c b/src/stash.c
index 89e5ff330..2efdd91c5 100644
--- a/src/stash.c
+++ b/src/stash.c
@@ -169,12 +169,12 @@ struct cb_data {
};
static int update_index_cb(
- void *cb_data,
const git_diff_delta *delta,
- float progress)
+ float progress,
+ void *payload)
{
int pos;
- struct cb_data *data = (struct cb_data *)cb_data;
+ struct cb_data *data = (struct cb_data *)payload;
GIT_UNUSED(progress);
@@ -253,7 +253,7 @@ static int build_untracked_tree(
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)
+ if (git_diff_foreach(diff, update_index_cb, NULL, NULL, &data) < 0)
goto cleanup;
if (build_tree_from_index(tree_out, index) < 0)
@@ -334,7 +334,7 @@ static int build_workdir_tree(
data.index = index;
data.include_changed = true;
- if (git_diff_foreach(diff, &data, update_index_cb, NULL, NULL) < 0)
+ if (git_diff_foreach(diff, update_index_cb, NULL, NULL, &data) < 0)
goto cleanup;
if (build_tree_from_index(tree_out, index) < 0)