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

Creating empty commits with --intent-to-add

From
Thomas Braun <thomas.braun@virtuell-zuhause.de>
Date
Jun 4, 2016, 17:54 UTC
Message-ID
<fdf86f73-0885-7191-2932-f10feba0bdfc@virtuell-zuhause.de>
Hi,
the following procedure

mkdir test cd test git init echo 1 >file git add --intent-to-add file git commit -m "blurb"

results in a commit. I would have expected that git commit complains, as I have not pased the --allow-empty option.

Is that intended behaviour?
Tested with 2.8.3.windows.1 and 2.1.4 on linux.
Thomas
Next: Duy Nguyen
Message 1 of 3 in “Creating empty commits with --intent-to-add”
  1. Thomas BraunJun 4, 2016
  2. Duy NguyenJun 5, 2016
  3. Thomas BraunJun 5, 2016

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.