Fossil SCM
Allowing partial commit for merges not adding a parent to the checkin.
Commit
a610b2567ff944eb27d80ee228249420dcd9acd4
Parent
ba402f33b2478cf…
1 file changed
+3
-2
+3
-2
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -1046,13 +1046,14 @@ | ||
| 1046 | 1046 | ** array is allocated to contain the "id" field from the vfile table |
| 1047 | 1047 | ** for each file to be committed. Or, if aCommitFile is NULL, all files |
| 1048 | 1048 | ** should be committed. |
| 1049 | 1049 | */ |
| 1050 | 1050 | select_commit_files(); |
| 1051 | - isAMerge = db_exists("SELECT 1 FROM vmerge"); | |
| 1051 | + /* id=0 means that it introduces a new parent */ | |
| 1052 | + isAMerge = db_exists("SELECT 1 FROM vmerge WHERE id=0"); | |
| 1052 | 1053 | if( g.aCommitFile && isAMerge ){ |
| 1053 | - fossil_fatal("cannot do a partial commit of a merge"); | |
| 1054 | + fossil_fatal("cannot do a partial commit of a graph merge"); | |
| 1054 | 1055 | } |
| 1055 | 1056 | |
| 1056 | 1057 | user_select(); |
| 1057 | 1058 | /* |
| 1058 | 1059 | ** Check that the user exists. |
| 1059 | 1060 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -1046,13 +1046,14 @@ | |
| 1046 | ** array is allocated to contain the "id" field from the vfile table |
| 1047 | ** for each file to be committed. Or, if aCommitFile is NULL, all files |
| 1048 | ** should be committed. |
| 1049 | */ |
| 1050 | select_commit_files(); |
| 1051 | isAMerge = db_exists("SELECT 1 FROM vmerge"); |
| 1052 | if( g.aCommitFile && isAMerge ){ |
| 1053 | fossil_fatal("cannot do a partial commit of a merge"); |
| 1054 | } |
| 1055 | |
| 1056 | user_select(); |
| 1057 | /* |
| 1058 | ** Check that the user exists. |
| 1059 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -1046,13 +1046,14 @@ | |
| 1046 | ** array is allocated to contain the "id" field from the vfile table |
| 1047 | ** for each file to be committed. Or, if aCommitFile is NULL, all files |
| 1048 | ** should be committed. |
| 1049 | */ |
| 1050 | select_commit_files(); |
| 1051 | /* id=0 means that it introduces a new parent */ |
| 1052 | isAMerge = db_exists("SELECT 1 FROM vmerge WHERE id=0"); |
| 1053 | if( g.aCommitFile && isAMerge ){ |
| 1054 | fossil_fatal("cannot do a partial commit of a graph merge"); |
| 1055 | } |
| 1056 | |
| 1057 | user_select(); |
| 1058 | /* |
| 1059 | ** Check that the user exists. |
| 1060 |