Hey, Responses inline!
On Friday, 3 July 2020 21:44, Chandan Singh <[email protected]> wrote: > > I wonder if there's another way to look at this problem, from the lens > of filtering files provided by sources. That is, allowing project > authors a way to include and exclude sub-directories/files in a > generic way. This can be useful in some other scenarios as well. For > example, when one wants to stage only a part of a monorepo. > > Such a functionality could be implemented in core without requiring > any participation from the plugins. In terms of UX, this would be > similar to the other generic source option we have, which is the > `directory` attribute. And, in terms of behavior, it'll be similar to > the functionality provided by the filter element. I could imagine the > syntax being something like: > > sources: > - kind: local > path: path/to/directory > include: > - * > exclude: > - /dev > > Since I've come across similar situations where I wanted to only stage > part of a source, I'm biased towards having it solved in core in a > generic way. And perhaps that is scope creep. So, I'd be curious to > hear what others think of this idea. > I like this idea, but I think that there are, in the end, orthogonal, though this one would also allow handling the other one. Would you see a reason why we would not want both? Cheers, Ben
