]> git.ipfire.org Git - thirdparty/git.git/blobdiff - blame.c
l10n: it.po: update the Italian translation for Git 2.24.0 round #2
[thirdparty/git.git] / blame.c
diff --git a/blame.c b/blame.c
index 3d8accf902ec55e7902cda6b2ee6a6820c4cdbab..29770e5c81c0ad36cc18f8f17475ba7b2f509fb2 100644 (file)
--- a/blame.c
+++ b/blame.c
@@ -144,7 +144,7 @@ static void append_merge_parents(struct repository *r,
 
        while (!strbuf_getwholeline_fd(&line, merge_head, '\n')) {
                struct object_id oid;
-               if (line.len < GIT_SHA1_HEXSZ || get_oid_hex(line.buf, &oid))
+               if (get_oid_hex(line.buf, &oid))
                        die("unknown line in '%s': %s",
                            git_path_merge_head(r), line.buf);
                tail = append_parent(r, tail, &oid);
@@ -419,8 +419,8 @@ static void get_fingerprint(struct fingerprint *result,
                        continue;
                hashmap_entry_init(&entry->entry, hash);
 
-               found_entry = hashmap_get_entry(&result->map, entry, NULL,
-                                       struct fingerprint_entry, entry);
+               found_entry = hashmap_get_entry(&result->map, entry,
+                                               /* member name */ entry, NULL);
                if (found_entry) {
                        found_entry->count += 1;
                } else {
@@ -433,7 +433,7 @@ static void get_fingerprint(struct fingerprint *result,
 
 static void free_fingerprint(struct fingerprint *f)
 {
-       hashmap_free(&f->map, 0);
+       hashmap_free(&f->map);
        free(f->entries);
 }
 
@@ -451,10 +451,8 @@ static int fingerprint_similarity(struct fingerprint *a, struct fingerprint *b)
        const struct fingerprint_entry *entry_a, *entry_b;
 
        hashmap_for_each_entry(&b->map, &iter, entry_b,
-                               const struct fingerprint_entry,
                                entry /* member name */) {
-               entry_a = hashmap_get_entry(&a->map, entry_b, NULL,
-                                       struct fingerprint_entry, entry);
+               entry_a = hashmap_get_entry(&a->map, entry_b, entry, NULL);
                if (entry_a) {
                        intersection += entry_a->count < entry_b->count ?
                                        entry_a->count : entry_b->count;
@@ -474,10 +472,8 @@ static void fingerprint_subtract(struct fingerprint *a, struct fingerprint *b)
        hashmap_iter_init(&b->map, &iter);
 
        hashmap_for_each_entry(&b->map, &iter, entry_b,
-                               const struct fingerprint_entry,
                                entry /* member name */) {
-               entry_a = hashmap_get_entry(&a->map, entry_b, NULL,
-                                       struct fingerprint_entry, entry);
+               entry_a = hashmap_get_entry(&a->map, entry_b, entry, NULL);
                if (entry_a) {
                        if (entry_a->count <= entry_b->count)
                                hashmap_remove(&a->map, &entry_b->entry, NULL);