git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Question on empty commit

From
Junio C Hamano <junkio@cox.net>
Date
Jan 15, 2006, 09:48 UTC
Message-ID
<7vmzhx7ref.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060114021800.4688.qmail@web31803.mail.mud.yahoo.com>
Luben Tuikov <ltuikov@yahoo.com> writes:
Show 6 quoted lines
> 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". What do you exactly mean? The tree object in the head commits in treeA branch and treeB branch were identical?

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.

Previous: Luben TuikovNext: Luben Tuikov
Message 2 of 6 in “Question on empty commit”
  1. Luben TuikovJan 14, 2006
  2. Junio C HamanoJan 15, 2006
  3. Luben TuikovJan 16, 2006
  4. Luben TuikovJan 16, 2006
  5. Junio C HamanoJan 16, 2006
  6. Junio C HamanoJan 16, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.