Commit 2c2cde47 by Ben Straub

Fix signatures for tree calls.

parent 56a5000d
...@@ -216,12 +216,12 @@ static int walk_ref_history(git_object **out, git_repository *repo, const char * ...@@ -216,12 +216,12 @@ static int walk_ref_history(git_object **out, git_repository *repo, const char *
const char *remote; const char *remote;
git_buf_clear(&buf); git_buf_clear(&buf);
git_buf_printf(&buf, "branch.%s.remote", refspec); git_buf_printf(&buf, "branch.%s.remote", refspec);
if (!git_config_get_string(cfg, git_buf_cstr(&buf), &remote)) { if (!git_config_get_string(&remote, cfg, git_buf_cstr(&buf))) {
/* Yes. Find the first merge target name. */ /* Yes. Find the first merge target name. */
const char *mergetarget; const char *mergetarget;
git_buf_clear(&buf); git_buf_clear(&buf);
git_buf_printf(&buf, "branch.%s.merge", refspec); git_buf_printf(&buf, "branch.%s.merge", refspec);
if (!git_config_get_string(cfg, git_buf_cstr(&buf), &mergetarget) && if (!git_config_get_string(&mergetarget, cfg, git_buf_cstr(&buf)) &&
!git__prefixcmp(mergetarget, "refs/heads/")) { !git__prefixcmp(mergetarget, "refs/heads/")) {
/* Success. Look up the target and fetch the object. */ /* Success. Look up the target and fetch the object. */
git_buf_clear(&buf); git_buf_clear(&buf);
...@@ -545,7 +545,7 @@ static const git_tree_entry* git_tree_entry_bypath(git_tree *tree, git_repositor ...@@ -545,7 +545,7 @@ static const git_tree_entry* git_tree_entry_bypath(git_tree *tree, git_repositor
while ((tok = git__strtok(&str, "/\\")) != NULL) { while ((tok = git__strtok(&str, "/\\")) != NULL) {
entry = git_tree_entry_byname(tree2, tok); entry = git_tree_entry_byname(tree2, tok);
if (tree2 != tree) git_tree_free(tree2); if (tree2 != tree) git_tree_free(tree2);
if (entry_is_tree(entry)) { if (git_tree_entry__is_tree(entry)) {
if (git_tree_lookup(&tree2, repo, &entry->oid) < 0) { if (git_tree_lookup(&tree2, repo, &entry->oid) < 0) {
free(alloc); free(alloc);
return NULL; return NULL;
...@@ -574,7 +574,7 @@ static int handle_colon_syntax(git_object **out, ...@@ -574,7 +574,7 @@ static int handle_colon_syntax(git_object **out,
/* Find the blob at the given path. */ /* Find the blob at the given path. */
entry = git_tree_entry_bypath(tree, repo, path); entry = git_tree_entry_bypath(tree, repo, path);
git_tree_free(tree); git_tree_free(tree);
return git_tree_entry_2object(out, repo, entry); return git_tree_entry_to_object(out, repo, entry);
} }
static int git__revparse_global_grep(git_object **out, git_repository *repo, const char *pattern) static int git__revparse_global_grep(git_object **out, git_repository *repo, const char *pattern)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment