git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Jens LehmannNext: Junio C Hamano
Message 6 of 15 in “assert failed in submodule edge case”
  1. Dennis KaarsemakerApr 13, 2015
  2. Dennis KaarsemakerApr 13, 2015
  3. Jens LehmannApr 16, 2015
  4. pathspec: adjust prefixlen after striping trailing slashNguyễn Thái Ngọc Duy, Apr 18, 2015
  5. Jens LehmannApr 19, 2015
  6. Duy NguyenApr 20, 2015
  7. Junio C HamanoApr 20, 2015
  8. Duy NguyenApr 20, 2015
  9. Junio C HamanoApr 21, 2015
  10. Jens LehmannApr 22, 2015
  11. Junio C HamanoApr 22, 2015
  12. Jens LehmannApr 22, 2015
  13. Junio C HamanoApr 23, 2015
  14. Duy NguyenJun 14, 2015
  15. Junio C HamanoJun 14, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.