mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
hashmap_get_next returns "struct hashmap_entry *"
This is a step towards removing the requirement for hashmap_entry being the first field of a struct. Signed-off-by: Eric Wong <e@80x24.org> Reviewed-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
973d5eea74
commit
6bcbdfb277
@@ -274,7 +274,7 @@ static int find_identical_files(struct hashmap *srcs,
|
||||
struct diff_options *options)
|
||||
{
|
||||
int renames = 0;
|
||||
|
||||
struct hashmap_entry *ent;
|
||||
struct diff_filespec *target = rename_dst[dst_index].two;
|
||||
struct file_similarity *p, *best = NULL;
|
||||
int i = 100, best_score = -1;
|
||||
@@ -282,12 +282,15 @@ static int find_identical_files(struct hashmap *srcs,
|
||||
/*
|
||||
* Find the best source match for specified destination.
|
||||
*/
|
||||
p = hashmap_get_from_hash(srcs,
|
||||
ent = hashmap_get_from_hash(srcs,
|
||||
hash_filespec(options->repo, target),
|
||||
NULL);
|
||||
for (; p; p = hashmap_get_next(srcs, &p->entry)) {
|
||||
for (; ent; ent = hashmap_get_next(srcs, ent)) {
|
||||
int score;
|
||||
struct diff_filespec *source = p->filespec;
|
||||
struct diff_filespec *source;
|
||||
|
||||
p = container_of(ent, struct file_similarity, entry);
|
||||
source = p->filespec;
|
||||
|
||||
/* False hash collision? */
|
||||
if (!oideq(&source->oid, &target->oid))
|
||||
|
||||
Reference in New Issue
Block a user