diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-01-24 11:36:41 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-01-25 08:15:44 +0100 |
commit | d541170c77b7ac738e2ffcdd04c838fb7cbbfb87 (patch) | |
tree | b4c829668eb8a1aa8db798bfdd31e95bb1a946e0 /src/merge.c | |
parent | d0a3de720e085d335d9ad46dc00a23dd03eda793 (diff) | |
download | libgit2-d541170c77b7ac738e2ffcdd04c838fb7cbbfb87.tar.gz |
index: rename an entry's id to 'id'
This was not converted when we converted the rest, so do it now.
Diffstat (limited to 'src/merge.c')
-rw-r--r-- | src/merge.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/merge.c b/src/merge.c index 2fb1c5898..23a1574f7 100644 --- a/src/merge.c +++ b/src/merge.c @@ -317,7 +317,7 @@ GIT_INLINE(int) index_entry_cmp(const git_index_entry *a, const git_index_entry return (b->path == NULL) ? 0 : 1; if ((value = a->mode - b->mode) == 0 && - (value = git_oid__cmp(&a->oid, &b->oid)) == 0) + (value = git_oid__cmp(&a->id, &b->id)) == 0) value = strcmp(a->path, b->path); return value; @@ -478,12 +478,12 @@ static int merge_conflict_resolve_one_renamed( conflict->type == GIT_MERGE_DIFF_RENAMED_ADDED) return 0; - ours_changed = (git_oid__cmp(&conflict->ancestor_entry.oid, &conflict->our_entry.oid) != 0); - theirs_changed = (git_oid__cmp(&conflict->ancestor_entry.oid, &conflict->their_entry.oid) != 0); + ours_changed = (git_oid__cmp(&conflict->ancestor_entry.id, &conflict->our_entry.id) != 0); + theirs_changed = (git_oid__cmp(&conflict->ancestor_entry.id, &conflict->their_entry.id) != 0); /* if both are modified (and not to a common target) require a merge */ if (ours_changed && theirs_changed && - git_oid__cmp(&conflict->our_entry.oid, &conflict->their_entry.oid) != 0) + git_oid__cmp(&conflict->our_entry.id, &conflict->their_entry.id) != 0) return 0; if ((merged = git_pool_malloc(&diff_list->pool, sizeof(git_index_entry))) == NULL) @@ -575,7 +575,7 @@ static int merge_conflict_resolve_automerge( index_entry->file_size = result.len; index_entry->mode = result.mode; - git_oid_cpy(&index_entry->oid, &automerge_oid); + git_oid_cpy(&index_entry->id, &automerge_oid); git_vector_insert(&diff_list->staged, index_entry); git_vector_insert(&diff_list->resolved, (git_merge_diff *)conflict); @@ -643,7 +643,7 @@ static int index_entry_similarity_exact( GIT_UNUSED(cache); GIT_UNUSED(opts); - if (git_oid__cmp(&a->oid, &b->oid) == 0) + if (git_oid__cmp(&a->id, &b->id) == 0) return 100; return 0; @@ -662,10 +662,10 @@ static int index_entry_similarity_calc( *out = NULL; - if ((error = git_blob_lookup(&blob, repo, &entry->oid)) < 0) + if ((error = git_blob_lookup(&blob, repo, &entry->id)) < 0) return error; - git_oid_cpy(&diff_file.oid, &entry->oid); + git_oid_cpy(&diff_file.oid, &entry->id); diff_file.path = entry->path; diff_file.size = entry->file_size; diff_file.mode = entry->mode; @@ -1163,7 +1163,7 @@ GIT_INLINE(int) merge_diff_detect_binary( int error = 0; if (GIT_MERGE_INDEX_ENTRY_ISFILE(conflict->ancestor_entry)) { - if ((error = git_blob_lookup(&ancestor_blob, repo, &conflict->ancestor_entry.oid)) < 0) + if ((error = git_blob_lookup(&ancestor_blob, repo, &conflict->ancestor_entry.id)) < 0) goto done; conflict->binary = git_blob_is_binary(ancestor_blob); @@ -1171,7 +1171,7 @@ GIT_INLINE(int) merge_diff_detect_binary( if (!conflict->binary && GIT_MERGE_INDEX_ENTRY_ISFILE(conflict->our_entry)) { - if ((error = git_blob_lookup(&our_blob, repo, &conflict->our_entry.oid)) < 0) + if ((error = git_blob_lookup(&our_blob, repo, &conflict->our_entry.id)) < 0) goto done; conflict->binary = git_blob_is_binary(our_blob); @@ -1179,7 +1179,7 @@ GIT_INLINE(int) merge_diff_detect_binary( if (!conflict->binary && GIT_MERGE_INDEX_ENTRY_ISFILE(conflict->their_entry)) { - if ((error = git_blob_lookup(&their_blob, repo, &conflict->their_entry.oid)) < 0) + if ((error = git_blob_lookup(&their_blob, repo, &conflict->their_entry.id)) < 0) goto done; conflict->binary = git_blob_is_binary(their_blob); @@ -1222,7 +1222,7 @@ GIT_INLINE(int) merge_delta_type_from_index_entries( return GIT_DELTA_TYPECHANGE; else if(S_ISLNK(ancestor->mode) ^ S_ISLNK(other->mode)) return GIT_DELTA_TYPECHANGE; - else if (git_oid__cmp(&ancestor->oid, &other->oid) || + else if (git_oid__cmp(&ancestor->id, &other->id) || ancestor->mode != other->mode) return GIT_DELTA_MODIFIED; @@ -1497,7 +1497,7 @@ static int merge_index_insert_reuc( } mode[idx] = entry->mode; - oid[idx] = &entry->oid; + oid[idx] = &entry->id; return git_index_reuc_add(index, entry->path, mode[0], oid[0], mode[1], oid[1], mode[2], oid[2]); |