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.
Commit
7a40eb97488b0462872e7b96c94ce1522b5548a8f2512edaf8a8ea471e99feee
Parent
2c72fb8742493fe…
1 file changed
+1
-1
+1
-1
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -1474,11 +1474,11 @@ | ||
| 1474 | 1474 | if( zBranch ){ |
| 1475 | 1475 | if( zTo || zFrom || zCheckin ){ |
| 1476 | 1476 | fossil_fatal("cannot use --from, --to, or --checkin with --branch"); |
| 1477 | 1477 | } |
| 1478 | 1478 | zTo = zBranch; |
| 1479 | - zFrom = mprintf("root:%s", zBranch); | |
| 1479 | + zFrom = mprintf("merge-in:%s", zBranch); | |
| 1480 | 1480 | zBranch = 0; |
| 1481 | 1481 | } |
| 1482 | 1482 | if( zCheckin!=0 && (zFrom!=0 || zTo!=0) ){ |
| 1483 | 1483 | fossil_fatal("cannot use --checkin together with --from or --to"); |
| 1484 | 1484 | } |
| 1485 | 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("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 |