Fossil SCM
The 'new' and 'init' commands again create an initial checkin unless the (new) --empty flag is given or (as before) --date-override is used.
Commit
3b66804d3f10f9ba23d7f83170b77306905a32e9
Parent
1a0179abd7d559c…
1 file changed
+5
M
src/db.c
+5
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -1450,14 +1450,19 @@ | ||
| 1450 | 1450 | void create_repository_cmd(void){ |
| 1451 | 1451 | char *zPassword; |
| 1452 | 1452 | const char *zTemplate; /* Repository from which to copy settings */ |
| 1453 | 1453 | const char *zDate; /* Date of the initial check-in */ |
| 1454 | 1454 | const char *zDefaultUser; /* Optional name of the default user */ |
| 1455 | + char const *zCreateEmpty; /* --empty flag set? */ | |
| 1455 | 1456 | |
| 1456 | 1457 | zTemplate = find_option("template",0,1); |
| 1457 | 1458 | zDate = find_option("date-override",0,1); |
| 1458 | 1459 | zDefaultUser = find_option("admin-user","A",1); |
| 1460 | + zCreateEmpty = find_option("empty", 0, 0); | |
| 1461 | + if(!zDate && !zCreateEmpty){ | |
| 1462 | + zDate = "now"; | |
| 1463 | + } | |
| 1459 | 1464 | if( g.argc!=3 ){ |
| 1460 | 1465 | usage("REPOSITORY-NAME"); |
| 1461 | 1466 | } |
| 1462 | 1467 | db_create_repository(g.argv[2]); |
| 1463 | 1468 | db_open_repository(g.argv[2]); |
| 1464 | 1469 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1450,14 +1450,19 @@ | |
| 1450 | void create_repository_cmd(void){ |
| 1451 | char *zPassword; |
| 1452 | const char *zTemplate; /* Repository from which to copy settings */ |
| 1453 | const char *zDate; /* Date of the initial check-in */ |
| 1454 | const char *zDefaultUser; /* Optional name of the default user */ |
| 1455 | |
| 1456 | zTemplate = find_option("template",0,1); |
| 1457 | zDate = find_option("date-override",0,1); |
| 1458 | zDefaultUser = find_option("admin-user","A",1); |
| 1459 | if( g.argc!=3 ){ |
| 1460 | usage("REPOSITORY-NAME"); |
| 1461 | } |
| 1462 | db_create_repository(g.argv[2]); |
| 1463 | db_open_repository(g.argv[2]); |
| 1464 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1450,14 +1450,19 @@ | |
| 1450 | void create_repository_cmd(void){ |
| 1451 | char *zPassword; |
| 1452 | const char *zTemplate; /* Repository from which to copy settings */ |
| 1453 | const char *zDate; /* Date of the initial check-in */ |
| 1454 | const char *zDefaultUser; /* Optional name of the default user */ |
| 1455 | char const *zCreateEmpty; /* --empty flag set? */ |
| 1456 | |
| 1457 | zTemplate = find_option("template",0,1); |
| 1458 | zDate = find_option("date-override",0,1); |
| 1459 | zDefaultUser = find_option("admin-user","A",1); |
| 1460 | zCreateEmpty = find_option("empty", 0, 0); |
| 1461 | if(!zDate && !zCreateEmpty){ |
| 1462 | zDate = "now"; |
| 1463 | } |
| 1464 | if( g.argc!=3 ){ |
| 1465 | usage("REPOSITORY-NAME"); |
| 1466 | } |
| 1467 | db_create_repository(g.argv[2]); |
| 1468 | db_open_repository(g.argv[2]); |
| 1469 |