Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-07 Thread Duy Nguyen
On Sat, May 7, 2016 at 2:18 AM, Stefan Beller wrote: > On Fri, May 6, 2016 at 12:02 PM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> On Fri, May 6, 2016 at 3:30 AM, Duy Nguyen wrote: On Fri, May 6, 2016 at 6:27 AM, Junio C Hamano wrote: > Stefan Beller writes: > >>>

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-06 Thread Junio C Hamano
Stefan Beller writes: > It was a bug, but now people in the outside world consider it a feature. > Search for "Git fake submodules" and you'll find a few users who use this > technique successfully. > > I do not think fixing this bug would do good. So maybe we just let it slip? I am OK with leav

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-06 Thread Stefan Beller
On Fri, May 6, 2016 at 12:02 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> On Fri, May 6, 2016 at 3:30 AM, Duy Nguyen wrote: >>> On Fri, May 6, 2016 at 6:27 AM, Junio C Hamano wrote: Stefan Beller writes: >> I wonder if the patches mentioned have something to do with the

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-06 Thread Junio C Hamano
Stefan Beller writes: > On Fri, May 6, 2016 at 3:30 AM, Duy Nguyen wrote: >> On Fri, May 6, 2016 at 6:27 AM, Junio C Hamano wrote: >>> Stefan Beller writes: >>> > I wonder if the patches mentioned have something to do with the "git > add deep/in/the/tree" that fails to notice deep/in/

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-06 Thread Stefan Beller
On Fri, May 6, 2016 at 3:30 AM, Duy Nguyen wrote: > On Fri, May 6, 2016 at 6:27 AM, Junio C Hamano wrote: >> Stefan Beller writes: >> I wonder if the patches mentioned have something to do with the "git add deep/in/the/tree" that fails to notice deep/in/ is an unrelated repository

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-06 Thread Duy Nguyen
On Fri, May 6, 2016 at 6:27 AM, Junio C Hamano wrote: > Stefan Beller writes: > >>> I wonder if the patches mentioned have something to do with the "git >>> add deep/in/the/tree" that fails to notice deep/in/ is an unrelated >>> repository in some way? The same functionality is added in 8745024

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-06 Thread Junio C Hamano
Stefan Beller writes: > There are 2 fundamental cases though. > (1) The bug we're talking about (as explained in that blog), refers to 2 > independent repositories, whose work trees are nested > (2) You seemed to bring in the notion that the nested repo is considered > a submodule of th

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 11:21 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> When deep/in/ is an unrelated repository, and running either >> >> git add deep/in/the >> git add deep/in/the/tree >> >> would add deep/in/the/tree/is-a-leaf.txt to my index, but if I did >> >> git ad

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Junio C Hamano
Junio C Hamano writes: > When deep/in/ is an unrelated repository, and running either > > git add deep/in/the > git add deep/in/the/tree > > would add deep/in/the/tree/is-a-leaf.txt to my index, but if I did > > git add deep/in > > I'd lose that and suddenly everything there turns int

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 4:54 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> That was my first reaction as well. However after a while of thought I >> actually >> like that bug. Consider the possibilities how gitk/git-gui or other >> subsystems >> can be developed. When accepting a patch

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Junio C Hamano
Stefan Beller writes: > That was my first reaction as well. However after a while of thought I > actually > like that bug. Consider the possibilities how gitk/git-gui or other subsystems > can be developed. When accepting a patch for that you can either apply the > patch in the outer or inner re

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 4:27 PM, Junio C Hamano wrote: > Stefan Beller writes: > >>> I wonder if the patches mentioned have something to do with the "git >>> add deep/in/the/tree" that fails to notice deep/in/ is an unrelated >>> repository in some way? >> >> Which is considered a feature now. May

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Junio C Hamano
Stefan Beller writes: >> I wonder if the patches mentioned have something to do with the "git >> add deep/in/the/tree" that fails to notice deep/in/ is an unrelated >> repository in some way? > > Which is considered a feature now. Maybe we should add tests for that? > > http://debuggable.com/post

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Stefan Beller
On Thu, May 5, 2016 at 4:09 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> `check_path_for_gitlink` was introduced in 9d67b61f739a (2013-01-06, >> add.c: extract check_path_for_gitlink() from treat_gitlinks() for reuse) >> but the implementation was removed in 5a76aff1a6 (2013-07-14, add:

Re: [PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Junio C Hamano
Stefan Beller writes: > `check_path_for_gitlink` was introduced in 9d67b61f739a (2013-01-06, > add.c: extract check_path_for_gitlink() from treat_gitlinks() for reuse) > but the implementation was removed in 5a76aff1a6 (2013-07-14, add: > convert to use parse_pathspec). > > Remove the declaration

[PATCH] pathspec: remove check_path_for_gitlink

2016-05-05 Thread Stefan Beller
`check_path_for_gitlink` was introduced in 9d67b61f739a (2013-01-06, add.c: extract check_path_for_gitlink() from treat_gitlinks() for reuse) but the implementation was removed in 5a76aff1a6 (2013-07-14, add: convert to use parse_pathspec). Remove the declaration from the header as well. Signed-o