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

Re: FYI: git-am allows creation of empty commits.

From
Junio C Hamano <junkio@cox.net>
Date
Feb 25, 2006, 06:04 UTC
Message-ID
<7v64n47z4f.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060224131922.GA19401@localdomain>
Eric Wong <normalperson@yhbt.net> writes:
Show 12 quoted lines
>> I think 99.9% of the time it is a mistake if a single-parented
>> commit has the same tree as its parent commit has, so having a
>> check in commit-tree may not be a bad idea.
>
> This would break importers, more than 0.1% I think...  Arch
> definitely allows empty commits for getting log messages in.
> SVN forbids them from their POV, but they also have things
> that we can't see when we import (properties like: mime,
> externals, eol-style) causing us to write the same tree twice.
> Not sure about CVS...
>
> Maybe a flag such as --force could be added.

Good point perhaps. Maybe an explicit --no-empty should ask for it, and git-am should use it. As to git-commit I am unsure.

In the meantime I'd drop the patch.
Previous: Eric Wong
Message 8 of 8 in “FYI: git-am allows creation of empty commits.”
  1. Eric W. BiedermanFeb 23, 2006
  2. Junio C HamanoFeb 24, 2006
  3. Eric W. BiedermanFeb 24, 2006
  4. Junio C HamanoFeb 24, 2006
  5. commit-tree: disallow an empty single-parent commit.Junio C Hamano, Feb 24, 2006
  6. Eric W. BiedermanFeb 24, 2006
  7. Eric WongFeb 24, 2006
  8. Junio C HamanoFeb 25, 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.