Duy Nguyen <pclo...@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.

Reply via email to