Re: [PATCH 2/2] apply: add --intent-to-add

2018-05-20 Thread Junio C Hamano
Duy Nguyen 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

Re: [PATCH 2/2] apply: add --intent-to-add

2018-05-20 Thread Duy Nguyen
On Mon, May 14, 2018 at 11:33:48AM +0900, Junio C Hamano wrote: > > diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt > > index 4ebc3d3271..2374f64b51 100644 > > --- a/Documentation/git-apply.txt > > +++ b/Documentation/git-apply.txt > > @@ -9,7 +9,7 @@ git-apply - Apply a

Re: [PATCH 2/2] apply: add --intent-to-add

2018-05-13 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Similar to 'git reset -N', this option makes 'git apply' automatically > mark new files as intent-to-add so they are visible in the following > 'git diff' command and could also be committed with 'git commit -a'. > > Signed-off-by: Nguyễn Thái

[PATCH 2/2] apply: add --intent-to-add

2018-05-13 Thread Nguyễn Thái Ngọc Duy
Similar to 'git reset -N', this option makes 'git apply' automatically mark new files as intent-to-add so they are visible in the following 'git diff' command and could also be committed with 'git commit -a'. Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-apply.txt