Fossil SCM
Added a link to https://fossil-scm.org/fossil/doc/trunk/www/branching.wiki#branching from the recent changes to the fossil ci "would fork" error message. *Hopefully* this will end the debate.
Commit
b761a72922ab2b02855a6226685191c4dcfdc114b8184a1ba2155409680a8d16
Parent
bf048cd576fc265…
1 file changed
+8
-2
+8
-2
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -2272,18 +2272,24 @@ | ||
| 2272 | 2272 | */ |
| 2273 | 2273 | if( !vid ){ |
| 2274 | 2274 | if( sCiInfo.zBranch==0 ){ |
| 2275 | 2275 | if( allowFork==0 && forceFlag==0 && g.markPrivate==0 |
| 2276 | 2276 | && db_exists("SELECT 1 from event where type='ci'") ){ |
| 2277 | - fossil_fatal("would fork. \"update\" first or use --branch."); | |
| 2277 | + fossil_fatal("would fork. \"update\" first or use --branch. See also\n" | |
| 2278 | + "https://fossil-scm.org/fossil/doc/trunk/www/branching.wiki#branching"); | |
| 2278 | 2279 | } |
| 2279 | 2280 | sCiInfo.zBranch = db_get("main-branch", "trunk"); |
| 2280 | 2281 | } |
| 2281 | 2282 | }else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0 |
| 2282 | 2283 | && g.markPrivate==0 && !is_a_leaf(vid) |
| 2283 | 2284 | ){ |
| 2284 | - fossil_fatal("would fork. \"update\" first or use --branch."); | |
| 2285 | + /* Can't avoid duplicating this string because some C compilers | |
| 2286 | + ** refuse to see static const char zErr[] = "... as "constant" | |
| 2287 | + ** enough for a printf() style format string. (e.g. Clang 10) | |
| 2288 | + */ | |
| 2289 | + fossil_fatal("would fork. \"update\" first or use --branch. See also\n" | |
| 2290 | + "https://fossil-scm.org/fossil/doc/trunk/www/branching.wiki#branching"); | |
| 2285 | 2291 | } |
| 2286 | 2292 | |
| 2287 | 2293 | /* |
| 2288 | 2294 | ** Do not allow a commit against a closed leaf unless the commit |
| 2289 | 2295 | ** ends up on a different branch. |
| 2290 | 2296 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2272,18 +2272,24 @@ | |
| 2272 | */ |
| 2273 | if( !vid ){ |
| 2274 | if( sCiInfo.zBranch==0 ){ |
| 2275 | if( allowFork==0 && forceFlag==0 && g.markPrivate==0 |
| 2276 | && db_exists("SELECT 1 from event where type='ci'") ){ |
| 2277 | fossil_fatal("would fork. \"update\" first or use --branch."); |
| 2278 | } |
| 2279 | sCiInfo.zBranch = db_get("main-branch", "trunk"); |
| 2280 | } |
| 2281 | }else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0 |
| 2282 | && g.markPrivate==0 && !is_a_leaf(vid) |
| 2283 | ){ |
| 2284 | fossil_fatal("would fork. \"update\" first or use --branch."); |
| 2285 | } |
| 2286 | |
| 2287 | /* |
| 2288 | ** Do not allow a commit against a closed leaf unless the commit |
| 2289 | ** ends up on a different branch. |
| 2290 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2272,18 +2272,24 @@ | |
| 2272 | */ |
| 2273 | if( !vid ){ |
| 2274 | if( sCiInfo.zBranch==0 ){ |
| 2275 | if( allowFork==0 && forceFlag==0 && g.markPrivate==0 |
| 2276 | && db_exists("SELECT 1 from event where type='ci'") ){ |
| 2277 | fossil_fatal("would fork. \"update\" first or use --branch. See also\n" |
| 2278 | "https://fossil-scm.org/fossil/doc/trunk/www/branching.wiki#branching"); |
| 2279 | } |
| 2280 | sCiInfo.zBranch = db_get("main-branch", "trunk"); |
| 2281 | } |
| 2282 | }else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0 |
| 2283 | && g.markPrivate==0 && !is_a_leaf(vid) |
| 2284 | ){ |
| 2285 | /* Can't avoid duplicating this string because some C compilers |
| 2286 | ** refuse to see static const char zErr[] = "... as "constant" |
| 2287 | ** enough for a printf() style format string. (e.g. Clang 10) |
| 2288 | */ |
| 2289 | fossil_fatal("would fork. \"update\" first or use --branch. See also\n" |
| 2290 | "https://fossil-scm.org/fossil/doc/trunk/www/branching.wiki#branching"); |
| 2291 | } |
| 2292 | |
| 2293 | /* |
| 2294 | ** Do not allow a commit against a closed leaf unless the commit |
| 2295 | ** ends up on a different branch. |
| 2296 |