summaryrefslogtreecommitdiff
path: root/src/stash.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-12-17 11:00:53 -0800
committerRussell Belfer <rb@github.com>2012-12-17 11:00:53 -0800
commit56c72b759c3adb92c0fdab18fccfb25fb561cd4f (patch)
tree9721502f41527e61265ae56940d30fddd5db9672 /src/stash.c
parentf79535092d86b531793640834bb010fa67dd4c3c (diff)
downloadlibgit2-56c72b759c3adb92c0fdab18fccfb25fb561cd4f.tar.gz
Fix diff constructor name order confusion
The diff constructor functions had some confusing names, where the "old" side of the diff was coming after the "new" side. This reverses the order in the function name to make it less confusing. Specifically... * git_diff_index_to_tree becomes git_diff_tree_to_index * git_diff_workdir_to_index becomes git_diff_index_to_workdir * git_diff_workdir_to_tree becomes git_diff_tree_to_workdir
Diffstat (limited to 'src/stash.c')
-rw-r--r--src/stash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/stash.c b/src/stash.c
index e32d8fa31..705fc75ea 100644
--- a/src/stash.c
+++ b/src/stash.c
@@ -251,7 +251,7 @@ static int build_untracked_tree(
if (git_commit_tree(&i_tree, i_commit) < 0)
goto cleanup;
- if (git_diff_workdir_to_tree(&diff, git_index_owner(index), i_tree, &opts) < 0)
+ if (git_diff_tree_to_workdir(&diff, git_index_owner(index), i_tree, &opts) < 0)
goto cleanup;
if (git_diff_foreach(diff, update_index_cb, NULL, NULL, &data) < 0)
@@ -323,10 +323,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, NULL, &opts) < 0)
+ if (git_diff_tree_to_index(&diff, repo, b_tree, NULL, &opts) < 0)
goto cleanup;
- if (git_diff_workdir_to_index(&diff2, repo, NULL, &opts) < 0)
+ if (git_diff_index_to_workdir(&diff2, repo, NULL, &opts) < 0)
goto cleanup;
if (git_diff_merge(diff, diff2) < 0)