git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yann Dirson <ydirson@altern.org>
To: git@vger.kernel.org
Cc: Yann Dirson <ydirson@altern.org>
Subject: [PATCH 1/6] Introduce debug_bulkmove() in diffcore-rename.
Date: Thu,  9 Dec 2010 22:38:02 +0100	[thread overview]
Message-ID: <1291930687-8990-2-git-send-email-ydirson@altern.org> (raw)
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

  reply	other threads:[~2010-12-09 21:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 21:38 [PATCH v9] Detection of directory renames Yann Dirson
2010-12-09 21:38 ` Yann Dirson [this message]
2010-12-09 21:38 ` [PATCH 2/6] Introduce bulk-move detection in diffcore Yann Dirson
2010-12-09 21:38 ` [PATCH 3/6] Raw diff output format for bulk moves Yann Dirson
2010-12-09 21:38 ` [PATCH 4/6] Add testcases for the --detect-bulk-moves diffcore flag Yann Dirson
2010-12-09 21:38 ` [PATCH 5/6] Unified diff output format for bulk moves Yann Dirson
2010-12-09 21:38 ` [PATCH 6/6] [WIP] Allow hiding renames of individual files involved in a directory rename Yann Dirson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1291930687-8990-2-git-send-email-ydirson@altern.org \
    --to=ydirson@altern.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).