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

Re: [PATCH v2] sparse-checkout: create leading directory

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Jan 24, 2022, 18:22 UTC
Message-ID
<20220124182231.2439029-1-jonathantanmy@google.com>
In-Reply-To
<CABPp-BG9rxJsA9XwgUxpny5TDW4W7Z85PAkBdzKJXrSJxAim1g@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 22 quoted lines
> On Fri, Jan 21, 2022 at 6:05 PM Jonathan Tan <jonathantanmy@google.com> wro=
> te:
> >
> > When creating the sparse-checkout file, Git does not create the leading
> > directory, "$GIT_DIR/info", if it does not exist. This causes problems
> > if the repository does not have that directory. Therefore, ensure that
> > the leading directory is created.
> >
> > This is the only "open" in builtin/sparse-checkout.c that does not have
> > a leading directory check. (The other one in write_patterns_and_update()
> > does.)
> >
> > Note that the test needs to explicitly specify a template when running
> > "git init" because the default template used in the tests has the
> > "info/" directory included.
> 
> If wanted, you could avoid that by using `git worktree add ...`;
> git-worktree will create a $GIT_DIR that does not contain an info
> subdirectory.
> 
> (No need to resubmit or anything, mostly I'm just mentioning another
> way folks might have triggered this issue.)
Ah, thanks for the information.
> Patch looks good to me:
> 
> Reviewed-by: Elijah Newren <newren@gmail.com>
Thanks for taking a look!
Previous: Elijah Newren
Message 14 of 14 in “sparse-checkout: create leading directory”
  1. sparse-checkout: create leading directoryJonathan Tan, Jan 20, 2022
  2. Junio C HamanoJan 20, 2022
  3. Ævar Arnfjörð BjarmasonJan 20, 2022
  4. SZEDER GáborJan 22, 2022
  5. sparse-checkout: create leading directoryJonathan Tan, Jan 21, 2022
  6. Ævar Arnfjörð BjarmasonJan 21, 2022
  7. Elijah NewrenJan 22, 2022
  8. Ævar Arnfjörð BjarmasonJan 22, 2022
  9. Elijah NewrenJan 22, 2022
  10. Ævar Arnfjörð BjarmasonJan 24, 2022
  11. Jonathan TanJan 24, 2022
  12. Elijah NewrenJan 25, 2022
  13. Elijah NewrenJan 22, 2022
  14. Jonathan TanJan 24, 2022

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.