Fossil SCM
Make merges a no-op if the pivot is the same as the version being merged.
Commit
bf079432fb2ecc14ce07fb73f02a9450c2d98cfc
Parent
724bf68a2f4eacc…
1 file changed
+4
+4
| --- src/merge.c | ||
| +++ src/merge.c | ||
| @@ -175,10 +175,14 @@ | ||
| 175 | 175 | pid = mid; |
| 176 | 176 | mid = t; |
| 177 | 177 | } |
| 178 | 178 | if( !is_a_version(pid) ){ |
| 179 | 179 | fossil_fatal("not a version: record #%d", pid); |
| 180 | + } | |
| 181 | + if( mid==pid ){ | |
| 182 | + fossil_print("This merge is a no-op.\n"); | |
| 183 | + return; | |
| 180 | 184 | } |
| 181 | 185 | if( detailFlag ){ |
| 182 | 186 | print_checkin_description(mid, 12, "merge-from:"); |
| 183 | 187 | print_checkin_description(pid, 12, "baseline:"); |
| 184 | 188 | } |
| 185 | 189 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -175,10 +175,14 @@ | |
| 175 | pid = mid; |
| 176 | mid = t; |
| 177 | } |
| 178 | if( !is_a_version(pid) ){ |
| 179 | fossil_fatal("not a version: record #%d", pid); |
| 180 | } |
| 181 | if( detailFlag ){ |
| 182 | print_checkin_description(mid, 12, "merge-from:"); |
| 183 | print_checkin_description(pid, 12, "baseline:"); |
| 184 | } |
| 185 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -175,10 +175,14 @@ | |
| 175 | pid = mid; |
| 176 | mid = t; |
| 177 | } |
| 178 | if( !is_a_version(pid) ){ |
| 179 | fossil_fatal("not a version: record #%d", pid); |
| 180 | } |
| 181 | if( mid==pid ){ |
| 182 | fossil_print("This merge is a no-op.\n"); |
| 183 | return; |
| 184 | } |
| 185 | if( detailFlag ){ |
| 186 | print_checkin_description(mid, 12, "merge-from:"); |
| 187 | print_checkin_description(pid, 12, "baseline:"); |
| 188 | } |
| 189 |