Index: src/db.c ================================================================== --- src/db.c +++ src/db.c @@ -2380,10 +2380,11 @@ ** ** Options: ** --template FILE Copy settings from repository file ** --admin-user|-A USERNAME Select given USERNAME as admin user ** --date-override DATETIME Use DATETIME as time of the initial check-in +** --empty do not create an initial check-in ** --sha1 Use an initial hash policy of "sha1" ** ** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in ** year-month-day form, it may be truncated, the "T" may be replaced by ** a space, and it may also name a timezone offset from UTC as "-HH:MM" @@ -2396,16 +2397,16 @@ char *zPassword; const char *zTemplate; /* Repository from which to copy settings */ const char *zDate; /* Date of the initial check-in */ const char *zDefaultUser; /* Optional name of the default user */ int bUseSha1 = 0; /* True to set the hash-policy to sha1 */ - - + int bMakeEmpty; zTemplate = find_option("template",0,1); zDate = find_option("date-override",0,1); zDefaultUser = find_option("admin-user","A",1); bUseSha1 = find_option("sha1",0,0)!=0; + bMakeEmpty = find_option("empty",0,0)!=0; /* We should be done with options.. */ verify_all_options(); if( g.argc!=3 ){ usage("REPOSITORY-NAME"); @@ -2422,11 +2423,11 @@ db_begin_transaction(); if( bUseSha1 ){ g.eHashPolicy = HPOLICY_SHA1; db_set_int("hash-policy", HPOLICY_SHA1, 0); } - if( zDate==0 ) zDate = "now"; + if( zDate==0 && bMakeEmpty==0 ) zDate = "now"; db_initial_setup(zTemplate, zDate, zDefaultUser); db_end_transaction(0); if( zTemplate ) db_detach("settingSrc"); fossil_print("project-id: %s\n", db_get("project-code", 0)); fossil_print("server-id: %s\n", db_get("server-code", 0));