From: Luben Tuikov Date: Mon, 16 Jan 2006 21:58:56 GMT Subject: Re: Question on empty commit Message-ID: <20060116215856.6618.qmail@web31805.mail.mud.yahoo.com> In-Reply-To: <7vmzhx7ref.fsf@assigned-by-dhcp.cox.net> --- Junio C Hamano wrote: > Luben Tuikov writes: > > > Now the last merge introduced an empty commit, since > > tree A and tree B had been in sync (only local and > > remote trunk had been out of sync). While it was expected > > that no commit would be introduced since they were in sync. > > > > Was the empty commit correct behavior? > > I do not quite follow you, but immediately before the "empty > commit" (I presume you mean the last "git merge" that merges > treeA head in treeB), you say "the treeA and treeB had been in > sync". Meaning that merging Tree A into Tree B would introduce 0 changes to Tree B. > What do you exactly mean? The tree object in the head > commits in treeA branch and treeB branch were identical? They cannot be, since Tree B contains Project B, which is not present in Tree A, but it depends on Project A in Tree A. > If that is the case, the commit being empty is the correct > behaviour, because there is no difference in the set of files > introduced by that commit. And the commit being made is also > the correct behaviour, because those two branches have different > development history, and the commit is what binds them together. So a new commit object, with 0 files changed was the correct behavior after all? I'd expect that there would be no commit object whatsoever since those trees had been synced before. I.e. the only thing which changed was the trunk and that trunk was synced to Tree A and Tree B separately. Thanks, Luben