Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-27 Thread Junio C Hamano
Brandon Williams writes: >> If you are in a subdirectory of your superproject, say, a/, >> >> cd a && git ls-files --recurse-submodules -- "b*" >> >> I would expect we would recurse into the submodule at "a/b" and find >> "b/file-at-top-of-B". What does the internal

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-27 Thread Brandon Williams
On 09/27, Junio C Hamano wrote: > Brandon Williams writes: > > > Well maybe...I don't really know much about how the prefix interacts in > > every scenario but would what you describe still work if we are in a sub > > dir of the superproject (which contains other directorys

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-27 Thread Junio C Hamano
Brandon Williams writes: > Well maybe...I don't really know much about how the prefix interacts in > every scenario but would what you describe still work if we are in a sub > dir of the superproject (which contains other directorys and perhaps a > submodule) and execute a

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-27 Thread Brandon Williams
On 09/27, Junio C Hamano wrote: > > What we internally call "prefix" and "--submodule-prefix" is closely > > related in that they both interact with pathspecs. "prefix" gets > > prepended to elements of an end-user supplied pathspec before a > > full-path-in-the-repository (i.e. a path in the

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-27 Thread Junio C Hamano
As this is relevant to what to call the prefix thing that is passed down to an internal re-invocation of ls-files and how to explain it to end-users... Junio C Hamano writes: > I agree that this is not specific to submodules; this is closely > related to what we internally

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-25 Thread Nazri Ramliy
On Sat, Sep 24, 2016 at 12:34 AM, Stefan Beller wrote: > git -C path/to/sub --keep-prefix ls-files Note that the above can also be written like so (and works identically), due to the fact that -C can be given multiple times: git -C path -C to -C sub --keep-prefix

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-23 Thread Stefan Beller
On Fri, Sep 23, 2016 at 9:16 AM, Brandon Williams wrote: >> Yeah, a positive "I support this" flag would at least let us correctly >> flag errors, which is the best we can do. That won't work for >> non-builtins, but perhaps it is good enough in practice. >> >> -Peff > > > So

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-23 Thread Brandon Williams
> Yeah, a positive "I support this" flag would at least let us correctly > flag errors, which is the best we can do. That won't work for > non-builtins, but perhaps it is good enough in practice. > > -Peff So it sounds like we agree that this prefix option should be pushed to the top level. The

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-23 Thread Jeff King
On Thu, Sep 22, 2016 at 10:47:17PM -0700, Stefan Beller wrote: > On Thu, Sep 22, 2016 at 8:41 PM, Jeff King wrote: > > >> * As Stefan alluded to (much) earlier, it might be a better idea > >>to have these 'prefix' as the global option to "git" potty, not > >>to each

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-22 Thread Stefan Beller
On Thu, Sep 22, 2016 at 8:41 PM, Jeff King wrote: >> * As Stefan alluded to (much) earlier, it might be a better idea >>to have these 'prefix' as the global option to "git" potty, not >>to each subcommand that happens to support them; > > That seems like it would be nice,

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-22 Thread Jeff King
On Thu, Sep 22, 2016 at 11:13:13AM -0700, Junio C Hamano wrote: > In any case, I would strongly recommend against exposing this (or > anything for that matter) "--prefix" to the end-user, especially > because this feature is likely to be applicable to many subcommands, > and some subcommands

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-22 Thread Junio C Hamano
Jeff King writes: > Should this option just be "--prefix", or maybe "--output-prefix"? > Submodules are the obvious use case here, but I could see somebody > adapting this for other uses (alternatively, if we _do_ want to keep it > just as an implementation detail for submodules,

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-22 Thread Stefan Beller
On Wed, Sep 21, 2016 at 9:18 PM, Jeff King wrote: > On Wed, Sep 21, 2016 at 04:13:22PM -0700, Junio C Hamano wrote: > >> Brandon Williams writes: >> >> > yes you mentioned this and I meant to change that before sending it out. >> > Looks like it slipped through

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-21 Thread Jeff King
On Wed, Sep 21, 2016 at 04:13:22PM -0700, Junio C Hamano wrote: > Brandon Williams writes: > > > yes you mentioned this and I meant to change that before sending it out. > > Looks like it slipped through have slipped through. > > I already fixed it up locally when I sent the

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-21 Thread Junio C Hamano
Brandon Williams writes: > yes you mentioned this and I meant to change that before sending it out. > Looks like it slipped through have slipped through. I already fixed it up locally when I sent the reply, but thanks for resending (which assures me that your local copy is

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-21 Thread Brandon Williams
yes you mentioned this and I meant to change that before sending it out. Looks like it slipped through have slipped through.

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-21 Thread Junio C Hamano
Brandon Williams writes: > This is another version of the first ls-files patch i sent out in > order. In this version I fixed the option > name to be '--submodule-prefix'. I understand that many internal changes in your work environment are titled like "DOing X", but our

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-21 Thread Brandon Williams
This is another version of the first ls-files patch i sent out in order. In this version I fixed the option name to be '--submodule-prefix'.