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

Re: [PATCH] hg-to-git: handle an empty dir in hg by combining git commits

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 1, 2007, 20:02 UTC
Message-ID
<7vd4tq41zt.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<4751A0FB.6090705@gmail.com>
Mark Drago <markdrago@gmail.com> 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.

Previous: Mark DragoNext: Junio C Hamano
Message 2 of 8 in “hg-to-git: handle an empty dir in hg by combining git commits”
  1. hg-to-git: handle an empty dir in hg by combining git commitsMark Drago, Dec 1, 2007
  2. Junio C HamanoDec 1, 2007
  3. git-commit --allow-emptyJunio C Hamano, Dec 3, 2007
  4. git-commit --allow-emptyJunio C Hamano, Dec 3, 2007
  5. Nicolas PitreDec 3, 2007
  6. Junio C HamanoDec 3, 2007
  7. Junio C HamanoDec 5, 2007
  8. Mark DragoDec 6, 2007

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.