diff options
author | David Härdeman <david@hardeman.nu> | 2007-05-18 22:59:33 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2007-05-18 22:59:33 +0200 |
commit | df8dbcf1e67d7360215d5aba17c4b9ba22ea9137 (patch) | |
tree | 039d05960d9b042dbc62d3c952da5db3a31dd84e /metastore.c | |
parent | 989c86cf1c313cdb94034f5ce0bc4403eae6a6c8 (diff) |
Add debug output for compare action
Diffstat (limited to 'metastore.c')
-rw-r--r-- | metastore.c | 33 |
1 files 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 |