Fossil SCM

Fix the "diff" command so that the --branch option shows the tip of the branch against its latest merge-in, not its root.

drh 2026-08-11 22:36 UTC trunk
Commit 7a40eb97488b0462872e7b96c94ce1522b5548a8f2512edaf8a8ea471e99feee
1 file changed +1 -1
+1 -1
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -1474,11 +1474,11 @@
14741474
if( zBranch ){
14751475
if( zTo || zFrom || zCheckin ){
14761476
fossil_fatal("cannot use --from, --to, or --checkin with --branch");
14771477
}
14781478
zTo = zBranch;
1479
- zFrom = mprintf("root:%s", zBranch);
1479
+ zFrom = mprintf("merge-in:%s", zBranch);
14801480
zBranch = 0;
14811481
}
14821482
if( zCheckin!=0 && (zFrom!=0 || zTo!=0) ){
14831483
fossil_fatal("cannot use --checkin together with --from or --to");
14841484
}
14851485
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -1474,11 +1474,11 @@
1474 if( zBranch ){
1475 if( zTo || zFrom || zCheckin ){
1476 fossil_fatal("cannot use --from, --to, or --checkin with --branch");
1477 }
1478 zTo = zBranch;
1479 zFrom = mprintf("root:%s", zBranch);
1480 zBranch = 0;
1481 }
1482 if( zCheckin!=0 && (zFrom!=0 || zTo!=0) ){
1483 fossil_fatal("cannot use --checkin together with --from or --to");
1484 }
1485
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -1474,11 +1474,11 @@
1474 if( zBranch ){
1475 if( zTo || zFrom || zCheckin ){
1476 fossil_fatal("cannot use --from, --to, or --checkin with --branch");
1477 }
1478 zTo = zBranch;
1479 zFrom = mprintf("merge-in:%s", zBranch);
1480 zBranch = 0;
1481 }
1482 if( zCheckin!=0 && (zFrom!=0 || zTo!=0) ){
1483 fossil_fatal("cannot use --checkin together with --from or --to");
1484 }
1485

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button