git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Aviv Eyal <avivey@gmail.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: git add --intent-to-add silently creates empty commits
Date: Mon, 19 Sep 2016 20:16:53 +0700	[thread overview]
Message-ID: <CACsJy8AGYPfX9936QJyKU8paxbt+SABMbeCWnpgVvODFr7v4LA@mail.gmail.com> (raw)
In-Reply-To: <xmqq1t0loxz4.fsf@gitster.mtv.corp.google.com>

On Fri, Sep 16, 2016 at 12:48 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Aviv Eyal <avivey@gmail.com> writes:
>
>> 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.

Yeah. I'm a bit behind, no, I'm waaaay behind my git backlog. This
definitely gets a rise-up, together with the multiworktree bug fix in
git-init.
-- 
Duy

      reply	other threads:[~2016-09-19 13:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-15  5:01 git add --intent-to-add silently creates empty commits Aviv Eyal
2016-09-15 17:48 ` Junio C Hamano
2016-09-19 13:16   ` Duy Nguyen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACsJy8AGYPfX9936QJyKU8paxbt+SABMbeCWnpgVvODFr7v4LA@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=avivey@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).