summaryrefslogtreecommitdiff
path: root/diffcore-rename.c
diff options
context:
space:
mode:
Diffstat (limited to 'diffcore-rename.c')
-rw-r--r--diffcore-rename.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/diffcore-rename.c b/diffcore-rename.c
index fab45b10d7..91b77993c7 100644
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
@@ -688,7 +688,6 @@ static void cleanup_dir_rename_info(struct dir_rename_info *info,
struct hashmap_iter iter;
struct strmap_entry *entry;
struct string_list to_remove = STRING_LIST_INIT_NODUP;
- int i;
if (!info->setup)
return;
@@ -734,7 +733,7 @@ static void cleanup_dir_rename_info(struct dir_rename_info *info,
if (strintmap_contains(counts, UNKNOWN_DIR))
strintmap_remove(counts, UNKNOWN_DIR);
}
- for (i = 0; i < to_remove.nr; ++i)
+ for (size_t i = 0; i < to_remove.nr; ++i)
strmap_remove(info->dir_rename_count,
to_remove.items[i].string, 1);
string_list_clear(&to_remove, 0);
@@ -933,7 +932,7 @@ static int find_basename_matches(struct diff_options *options,
* spend more cycles to find similarities between files, so it may
* be less likely that this heuristic is wanted. If someone is
* doing break detection, that means they do not want filename
- * similarity to imply any form of content similiarity, and thus
+ * similarity to imply any form of content similarity, and thus
* this heuristic would definitely be incompatible.
*/
@@ -1388,7 +1387,7 @@ void diffcore_rename_extended(struct diff_options *options,
int detect_rename = options->detect_rename;
int minimum_score = options->rename_score;
struct diff_queue_struct *q = &diff_queued_diff;
- struct diff_queue_struct outq;
+ struct diff_queue_struct outq = DIFF_QUEUE_INIT;
struct diff_score *mx;
int i, j, rename_count, skip_unmodified = 0;
int num_destinations, dst_cnt;
@@ -1534,7 +1533,7 @@ void diffcore_rename_extended(struct diff_options *options,
* - remove ones not found in relevant_sources
* and
* - remove ones in relevant_sources which are needed only
- * for directory renames IF no ancestory directory
+ * for directory renames IF no ancestry directory
* actually needs to know any more individual path
* renames under them
*/
@@ -1568,6 +1567,7 @@ void diffcore_rename_extended(struct diff_options *options,
trace2_region_enter("diff", "inexact renames", options->repo);
if (options->show_rename_progress) {
progress = start_delayed_progress(
+ the_repository,
_("Performing inexact rename detection"),
(uint64_t)num_destinations * (uint64_t)num_sources);
}
@@ -1638,7 +1638,6 @@ void diffcore_rename_extended(struct diff_options *options,
* are recorded in rename_dst. The original list is still in *q.
*/
trace2_region_enter("diff", "write back to queue", options->repo);
- DIFF_QUEUE_CLEAR(&outq);
for (i = 0; i < q->nr; i++) {
struct diff_filepair *p = q->queue[i];
struct diff_filepair *pair_to_free = NULL;