From: Junio C Hamano Date: Sat, 01 Dec 2007 20:02:46 GMT Subject: Re: [PATCH] hg-to-git: handle an empty dir in hg by combining git commits Message-ID: <7vd4tq41zt.fsf@gitster.siamese.dyndns.org> In-Reply-To: <4751A0FB.6090705@gmail.com> Mark Drago writes: > This patch will detect that there are no changes to commit (using git-status), > and will not perform the commit, but will instead combine the log messages of > that (non-)commit with the next commit. I think a better approach would be to implement --no-tree-change-is-ok option to git-commit, strictly for use by foreign scm interface scripts like yours. It does not usually make sense to record a commit that has the exact same tree as its sole parent commit and that is why git-commit prevents you from making that mistake, but when data from foreign scm is involved, it is a different story. We are equipped to represent such a (perhaps insane, perhaps by mistake, or perhaps done on purpose) change and it is better to represent it bypassing the safety valve for native use.