Re: git add --intent-to-add silently creates empty commits
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 15, 2016, 17:48 UTC
- Message-ID
- <xmqq1t0loxz4.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAGHT48L2s_nf-oSGPKrOB7uo5UAkCScNh+Ju5xH1dE5DFVnHwA@mail.gmail.com>
Aviv Eyal <avivey@gmail.com> writes:
Show 11 quoted lines
> Using `git add -N` allows creating of empty commits: > > git init test && cd test > echo text > file > git add --intent-to-add file > git commit -m 'Empty commit' > echo $? # prints 0 > ... > I'd expect `git commit` to error out instead of producing an empty commit. > > I've seen this with git 2.8.1 and 2.10.0.129.g35f6318
I think I've seen this reported some time ago.
https://public-inbox.org/git/%3CCACsJy8A8-RgpYxYsJBaLrMia7D3DfQPr4cxASNsaLyCnmgm3ZQ@mail.gmail.com%3E/
I do not offhand recall what happend to the topic after that.