From df8dbcf1e67d7360215d5aba17c4b9ba22ea9137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20H=C3=A4rdeman?= Date: Fri, 18 May 2007 22:59:33 +0200 Subject: Add debug output for compare action --- metastore.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/metastore.c b/metastore.c index 0c15d83..db95896 100644 --- a/metastore.c +++ b/metastore.c @@ -530,22 +530,25 @@ compare_print(struct metaentry *left, struct metaentry *right, int cmp) return; } - if (cmp != 0) { - printf("Path %s: ", left->path); - if (cmp & DIFF_OWNER) - printf("owner "); - if (cmp & DIFF_GROUP) - printf("group "); - if (cmp & DIFF_MODE) - printf("mode "); - if (cmp & DIFF_TYPE) - printf("type "); - if (cmp & DIFF_MTIME) - printf("mtime "); - if (cmp & DIFF_XATTR) - printf("xattr "); - printf("\n"); + if (cmp == DIFF_NONE) { + msg(MSG_DEBUG, "Path %s: no difference\n", left->path); + return; } + + printf("Path %s: ", left->path); + if (cmp & DIFF_OWNER) + printf("owner "); + if (cmp & DIFF_GROUP) + printf("group "); + if (cmp & DIFF_MODE) + printf("mode "); + if (cmp & DIFF_TYPE) + printf("type "); + if (cmp & DIFF_MTIME) + printf("mtime "); + if (cmp & DIFF_XATTR) + printf("xattr "); + printf("\n"); } void -- cgit v1.2.1