Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-03-12 05:27:23 +0300
committerJunio C Hamano <gitster@pobox.com>2018-03-14 19:23:47 +0300
commitfc5cb99f675b2052f6d6bd3e2520379031b12267 (patch)
tree9f45a583e635e24dafac4a5bf6118142314e4c6c /builtin/am.c
parent38b471fae0f2b961259201278b24b11262dc7596 (diff)
cache-tree: convert write_*_as_tree to object_id
Convert write_index_as_tree and write_cache_as_tree to use struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/am.c')
-rw-r--r--builtin/am.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 1151b5c73a..1bcc3606c5 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -1550,7 +1550,7 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa
discard_cache();
read_cache_from(index_path);
- if (write_index_as_tree(orig_tree.hash, &the_index, index_path, 0, NULL))
+ if (write_index_as_tree(&orig_tree, &the_index, index_path, 0, NULL))
return error(_("Repository lacks necessary blobs to fall back on 3-way merge."));
say(state, stdout, _("Using index info to reconstruct a base tree..."));
@@ -1575,7 +1575,7 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa
return error(_("Did you hand edit your patch?\n"
"It does not apply to blobs recorded in its index."));
- if (write_index_as_tree(their_tree.hash, &the_index, index_path, 0, NULL))
+ if (write_index_as_tree(&their_tree, &the_index, index_path, 0, NULL))
return error("could not write tree");
say(state, stdout, _("Falling back to patching base and 3-way merge..."));
@@ -1626,7 +1626,7 @@ static void do_commit(const struct am_state *state)
if (run_hook_le(NULL, "pre-applypatch", NULL))
exit(1);
- if (write_cache_as_tree(tree.hash, 0, NULL))
+ if (write_cache_as_tree(&tree, 0, NULL))
die(_("git write-tree failed to write a tree"));
if (!get_oid_commit("HEAD", &parent)) {
@@ -2004,7 +2004,7 @@ static int clean_index(const struct object_id *head, const struct object_id *rem
if (fast_forward_to(head_tree, head_tree, 1))
return -1;
- if (write_cache_as_tree(index.hash, 0, NULL))
+ if (write_cache_as_tree(&index, 0, NULL))
return -1;
index_tree = parse_tree_indirect(&index);