summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 485445e)
raw | patch | inline | side by side (parent: 485445e)
author | Jeff King <peff@peff.net> | |
Sun, 20 Feb 2011 09:51:16 +0000 (04:51 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 21 Feb 2011 18:24:07 +0000 (10:24 -0800) |
We might spend many seconds doing inexact rename detection
with no output. It's nice to let the user know that
something is actually happening.
This patch adds the infrastructure, but no callers actually
turn on progress reporting.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
with no output. It's nice to let the user know that
something is actually happening.
This patch adds the infrastructure, but no callers actually
turn on progress reporting.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.h | patch | blob | history | |
diffcore-rename.c | patch | blob | history |
index f774c9ab51221dac3d84ec75cd7787b1c8e3e3bf..9585e41aea3ba32b1132a6137151b66b22908c32 100644 (file)
--- a/diff.h
+++ b/diff.h
int rename_score;
int rename_limit;
int needed_rename_limit;
+ int show_rename_progress;
int dirstat_percent;
int setup;
int abbrev;
diff --git a/diffcore-rename.c b/diffcore-rename.c
index 1943c46b940fd6057ac1394915ceb8f786912836..cb57f512726b891e609ca75d05344f529cc5e1ac 100644 (file)
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
#include "diff.h"
#include "diffcore.h"
#include "hash.h"
+#include "progress.h"
/* Table of rename/copy destinations */
struct diff_score *mx;
int i, j, rename_count;
int num_create, num_src, dst_cnt;
+ struct progress *progress = NULL;
if (!minimum_score)
minimum_score = DEFAULT_RENAME_SCORE;
goto cleanup;
}
+ if (options->show_rename_progress) {
+ progress = start_progress_delay(
+ "Performing inexact rename detection",
+ rename_dst_nr * rename_src_nr, 50, 1);
+ }
+
mx = xcalloc(num_create * NUM_CANDIDATE_PER_DST, sizeof(*mx));
for (dst_cnt = i = 0; i < rename_dst_nr; i++) {
struct diff_filespec *two = rename_dst[i].two;
diff_free_filespec_blob(two);
}
dst_cnt++;
+ display_progress(progress, (i+1)*rename_src_nr);
}
+ stop_progress(&progress);
/* cost matrix sorted by most to least similar pair */
qsort(mx, dst_cnt * NUM_CANDIDATE_PER_DST, sizeof(*mx), score_compare);