Re: [PATCH] pathspec: adjust prefixlen after striping trailing slash
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Apr 20, 2015, 01:34 UTC
- Message-ID
- <CACsJy8A7+rQhn5ry6Z86SbeYHoDw=w7tB73Ls2V05E8F-JMnhA@mail.gmail.com>
- In-Reply-To
- <5533A567.7070301@web.de>
On Sun, Apr 19, 2015 at 7:53 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
Show 14 quoted lines
> And me thinks it should error out. We already do that when trying > to add a specific file from above the gitlink: > > $ git add subrepo/a > fatal: Pathspec 'subrepo/a' is in submodule 'subrepo' > > And from below the gitlink: > > $ cd subrepo > $ git add a > fatal: Pathspec 'a' is in submodule 'subrepo' > > I think we should do the same when using "git add ." below the > gitlink.
But if you look at it another way, "cd subrepo; git add ." should be the same as "git add subrepo" and the latter does not error out (I think because it hits the "if (!is_directory())" in is_submodule_modified()). If we make the former error out, I suspect the latter will follow the same behavior. Just double checking if this is what we want..
-- Duy