summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-04-09 23:25:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-09 23:25:45 (GMT)
commita5bbc29994b22ab0b57c4dc9568a261d32476e94 (patch)
tree4cf0247ad3bac3f8130f83a2f9b40197a24fab0f /sequencer.c
parent78c20b8fcaf0c46942a8c91e38076358f9a948ac (diff)
parent1a750441a7360b29fff7a414649ece1d35acaca6 (diff)
downloadgit-a5bbc29994b22ab0b57c4dc9568a261d32476e94.zip
git-a5bbc29994b22ab0b57c4dc9568a261d32476e94.tar.gz
git-a5bbc29994b22ab0b57c4dc9568a261d32476e94.tar.bz2
Merge branch 'bc/object-id'
Conversion from uchar[20] to struct object_id continues. * bc/object-id: (36 commits) convert: convert to struct object_id sha1_file: introduce a constant for max header length Convert lookup_replace_object to struct object_id sha1_file: convert read_sha1_file to struct object_id sha1_file: convert read_object_with_reference to object_id tree-walk: convert tree entry functions to object_id streaming: convert istream internals to struct object_id tree-walk: convert get_tree_entry_follow_symlinks internals to object_id builtin/notes: convert static functions to object_id builtin/fmt-merge-msg: convert remaining code to object_id sha1_file: convert sha1_object_info* to object_id Convert remaining callers of sha1_object_info_extended to object_id packfile: convert unpack_entry to struct object_id sha1_file: convert retry_bad_packed_offset to struct object_id sha1_file: convert assert_sha1_type to object_id builtin/mktree: convert to struct object_id streaming: convert open_istream to use struct object_id sha1_file: convert check_sha1_signature to struct object_id sha1_file: convert read_loose_object to use struct object_id builtin/index-pack: convert struct ref_delta_entry to object_id ...
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sequencer.c b/sequencer.c
index f9d1001..667f35e 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -282,7 +282,7 @@ struct commit_message {
static const char *short_commit_name(struct commit *commit)
{
- return find_unique_abbrev(commit->object.oid.hash, DEFAULT_ABBREV);
+ return find_unique_abbrev(&commit->object.oid, DEFAULT_ABBREV);
}
static int get_message(struct commit *commit, struct commit_message *out)
@@ -1112,7 +1112,7 @@ static int try_to_commit(struct strbuf *msg, const char *author,
commit_list_insert(current_head, &parents);
}
- if (write_cache_as_tree(tree.hash, 0, NULL)) {
+ if (write_cache_as_tree(&tree, 0, NULL)) {
res = error(_("git write-tree failed to write a tree"));
goto out;
}
@@ -1474,7 +1474,7 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
* that represents the "current" state for merge-recursive
* to work on.
*/
- if (write_cache_as_tree(head.hash, 0, NULL))
+ if (write_cache_as_tree(&head, 0, NULL))
return error(_("your index file is unmerged."));
} else {
unborn = get_oid("HEAD", &head);
@@ -2876,7 +2876,8 @@ int sequencer_pick_revisions(struct replay_opts *opts)
if (!get_oid(name, &oid)) {
if (!lookup_commit_reference_gently(&oid, 1)) {
- enum object_type type = sha1_object_info(oid.hash, NULL);
+ enum object_type type = oid_object_info(&oid,
+ NULL);
return error(_("%s: can't cherry-pick a %s"),
name, type_name(type));
}