Re: erratic behavior commit --allow-empty
- From
- Angelo Borsotti <angelo.borsotti@gmail.com>
- Date
- Oct 3, 2012, 06:22 UTC
- Message-ID
- <CAB9Jk9DH4Gx-8oJzb8H=ytohhZnMbA92pwj5P25AehmZ3PMmcg@mail.gmail.com>
- In-Reply-To
- <506BCF19.7020800@viscovery.net>
Hi PJ and Hannes,
try to run the last script that I posted, with and without a sleep 1 before the last commit:
git init echo "aaa" >f1 git add f1 git commit -m A git checkout --orphan sources git commit -m A --allow-empty
and
git init echo "aaa" >f1 git add f1 git commit -m A git checkout --orphan sources sleep 1 git commit -m A --allow-empty
In the first one, no new commit is created, and the "sources" branch is not orphan (you can easily see it with the git gui). In the second one, a new commit is created, and the "sources" branch is orphan, as expected.
-Angelo