summaryrefslogtreecommitdiffstats
path: root/src/diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/diff.c')
-rw-r--r--src/diff.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/diff.c b/src/diff.c
index 5bcbde5..9a87d81 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -301,19 +301,25 @@ static int list_cb(DB *ddb, struct syrep_name *name, struct diff_entry *de, void
switch (de->action) {
case DIFF_COPY: {
char d[33];
- char src, dst;
+ char dst;
+ int mf;
+
+ if ((mf = get_current_nrecno_by_md(de->repository == cb_info->c1 ? cb_info->c2 : cb_info->c1,
+ de->repository == cb_info->c1 ? &md1 : &md2, NULL)) < 0)
+ return -1;
if (de->repository == cb_info->c1) {
- src = 'A'; dst = 'B';
+ dst = 'B';
fhex_md5(md1.digest, d);
} else {
- src = 'B'; dst = 'A';
+ dst = 'A';
fhex_md5(md2.digest, d);
}
d[32] = 0;
+
+ printf("COPY <%s|%s> TO %c%s\n", d, name->path, dst, mf ? " (LINK POSSIBLE)" : "");
- printf("COPY <%s|%s> FROM %c TO %c\n", d, name->path, src, dst);
break;
}
@@ -333,7 +339,6 @@ static int list_cb(DB *ddb, struct syrep_name *name, struct diff_entry *de, void
printf("DELETE <%s|%s> FROM %c\n", d, name->path, rep);
break;
-
}
case DIFF_CONFLICT: {