From: Junio C Hamano <gitster@pobox.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] apply: add --intent-to-add
Date: Mon, 21 May 2018 12:14:35 +0900 [thread overview]
Message-ID: <xmqqa7st3dk4.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20180520063424.GA3062@duynguyen.home> (Duy Nguyen's message of "Sun, 20 May 2018 08:34:24 +0200")
Duy Nguyen <pclouds@gmail.com> writes:
>> > if (state->check_index && is_not_gitdir)
>> > return error(_("--index outside a repository"));
>> > + if (state->set_ita && is_not_gitdir)
>> > + state->set_ita = 0;
>>
>> I think this should error out, just like one line above does.
>> "I-t-a" is impossible without having the index, just like "--index"
>> is impossible without having the index.
>
> I was hoping to put this in an alias that works both with or without a
> repository. Do you feel strongly about this?
"git apply --index" that silently applied only to the filesystem
files without telling me that I am in a wrong directory by mistake
is a UI disaster, and that is what the existing error we see in the
pre context is about. I do not think of a good reason why "git
apply --i-t-a" should behave any differently.
next prev parent reply other threads:[~2018-05-21 3:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-13 17:54 [PATCH 1/2] diff: turn --ita-invisible-in-index on by default Nguyễn Thái Ngọc Duy
2018-05-13 17:54 ` [PATCH 2/2] apply: add --intent-to-add Nguyễn Thái Ngọc Duy
2018-05-14 2:33 ` Junio C Hamano
2018-05-20 6:34 ` Duy Nguyen
2018-05-21 3:14 ` Junio C Hamano [this message]
2018-05-25 3:39 ` [PATCH 1/2] diff: turn --ita-invisible-in-index on by default Jonathan Nieder
2018-05-25 14:30 ` Duy Nguyen
2018-05-25 16:43 ` Jonathan Nieder
2018-05-25 16:59 ` Duy Nguyen
2018-05-26 12:08 ` [PATCH v2 0/4] Fix i-t-a entries in git-diff and git-apply Nguyễn Thái Ngọc Duy
2018-05-26 12:08 ` [PATCH v2 1/4] diff: ignore --ita-[in]visible-in-index when diffing worktree-to-tree Nguyễn Thái Ngọc Duy
2018-05-27 7:18 ` Eric Sunshine
2018-05-26 12:08 ` [PATCH v2 2/4] diff: turn --ita-invisible-in-index on by default Nguyễn Thái Ngọc Duy
2018-05-26 12:08 ` [PATCH v2 3/4] t2203: add a test about "diff HEAD" case Nguyễn Thái Ngọc Duy
2018-05-26 12:08 ` [PATCH v2 4/4] apply: add --intent-to-add Nguyễn Thái Ngọc Duy
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqa7st3dk4.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.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.
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 NNTP newsgroup(s).