git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/6] Introduce debug_bulkmove() in diffcore-rename.

From
Yann Dirson <ydirson@altern.org>
Date
Dec 9, 2010, 21:38 UTC
Message-ID
<1291930687-8990-2-git-send-email-ydirson@altern.org>
In-Reply-To
<1291930687-8990-1-git-send-email-ydirson@altern.org>
This is an optional debug useful while developping new builk-* features.
Signed-off-by: Yann Dirson <ydirson@altern.org>
---
 diffcore-rename.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/diffcore-rename.c b/diffcore-rename.c
index f7afdeb..e16fdeb 100644
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
@@ -7,6 +7,22 @@
 #include "hash.h"
 #include "sorted-array.h"
 
+#define DEBUG_BULKMOVE 0
+
+#if DEBUG_BULKMOVE
+#define debug_bulkmove(args) __debug_bulkmove args
+void __debug_bulkmove(const char *fmt, ...)
+{
+	va_list ap;
+	va_start(ap, fmt);
+	fprintf(stderr, "[DBG] ");
+	vfprintf(stderr, fmt, ap);
+	va_end(ap);
+}
+#else
+#define debug_bulkmove(args) do { /*nothing */ } while (0)
+#endif
+
 /* Table of rename/copy destinations */
 
 struct diff_rename_dst {
-- 
1.7.2.3
Previous: Yann DirsonNext: Yann Dirson
Message 2 of 7 in “Detection of directory renames”
  1. Detection of directory renamesYann Dirson, Dec 9, 2010
  2. 1/6 Introduce debug_bulkmove() in diffcore-rename.Yann Dirson, Dec 9, 2010
  3. 2/6 Introduce bulk-move detection in diffcore.Yann Dirson, Dec 9, 2010
  4. 3/6 Raw diff output format for bulk moves.Yann Dirson, Dec 9, 2010
  5. 4/6 Add testcases for the --detect-bulk-moves diffcore flag.Yann Dirson, Dec 9, 2010
  6. 5/6 Unified diff output format for bulk moves.Yann Dirson, Dec 9, 2010
  7. 6/6 [WIP] Allow hiding renames of individual files involved in a directory rename.Yann Dirson, Dec 9, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.