2017-07-17 6:33 GMT+02:00 Damien Sykes-Lindley:
> Hi there,
> Is there a way of removing or preventing the creation of the “initial empty
> checkin”? I personally can’t see any practical uses for that, unless the
> implementation somehow requires it.
> Also, this checkin seems to be automatically sent to trunk. Is there any way
> of renaming this branch, either on the creation of the repository or later
> on?
> Thanks.
> Damien.

Hi Damien,

The patch below modifies Fossil not to create the initial empty
commit. (I always build Fossil with this patch). Everything works
fine without initial empty commit, the reason this was in Fossil is
just historical. Nowadays, there - indeed - is no reason any more
to create an empty initial commit, in my opinion is confuses
more than that it helps anything. Your mail tells me enough ....

If you want to get rid of an - already created - initial commit, you
can just "purge" it. Normally you need to be careful purging
anything, but in this case it will just work fine. If there already
were follow-up commits, that's no problem: the next commit
will become the new initial commit. If a fossil repository doesn't
have any commits, the first commit you do after that will
become the new initial commit.

        Jan Nijtmans

 Index: src/db.c
--- src/db.c
+++ src/db.c
@@ -1997,11 +1997,10 @@
   if( bUseSha1 ){
     g.eHashPolicy = HPOLICY_SHA1;
     db_set_int("hash-policy", HPOLICY_SHA1, 0);
-  if( zDate==0 ) zDate = "now";
   db_initial_setup(zTemplate, zDate, zDefaultUser);
   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));
Index: src/main.c
--- src/main.c
+++ src/main.c
@@ -2027,11 +2027,11 @@
         g.eHashPolicy = HPOLICY_AUTO;
         db_set_int("hash-policy", HPOLICY_AUTO, 0);
-        db_initial_setup(0, "now", g.zLogin);
+        db_initial_setup(0, 0, g.zLogin);
         fossil_print("project-id: %s\n", db_get("project-code", 0));
         fossil_print("server-id:  %s\n", db_get("server-code", 0));
         zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
         fossil_print("admin-user: %s (initial password is \"%s\")\n",
fossil-users mailing list

Reply via email to