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

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

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Jan 22, 2022, 07:58 UTC
Message-ID
<20220122075851.GA1718@szeder.dev>
In-Reply-To
<220120.86mtjqks1b.gmgdl@evledraar.gmail.com>
On Thu, Jan 20, 2022 at 10:30:03PM +0100, Ævar Arnfjörð Bjarmason wrote:
Show 22 quoted lines
> > diff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh
> > index 42776984fe..dba0737599 100755
> > --- a/t/t1091-sparse-checkout-builtin.sh
> > +++ b/t/t1091-sparse-checkout-builtin.sh
> > @@ -79,6 +79,13 @@ test_expect_success 'git sparse-checkout init' '
> >  	check_files repo a
> >  '
> >  
> > +test_expect_success 'git sparse-checkout init in empty repo' '
> > +	test_when_finished rm -rf empty-repo blank-template &&
> > +	mkdir blank-template &&
> > +	git init --template=blank-template empty-repo &&
> > +	git -C empty-repo sparse-checkout init
> > +'
> > +
> >  test_expect_success 'git sparse-checkout list after init' '
> >  	git -C repo sparse-checkout list >actual &&
> >  	cat >expect <<-\EOF &&
> 
> You're using an overly verbose way to say "no templates, please". You
> can squash this in, i.e. --template= is an explicitly supported way to
> do that.

It would be even more expressive to use 'git init --no-template', but, alas, that doesn't work:

  $ git init --no-template /tmp/foo
  Initialized empty Git repository in /tmp/foo/.git/
  $ ls /tmp/foo/.git
  branches  config  description  HEAD  hooks  info  objects  refs
Previous: Ævar Arnfjörð BjarmasonNext: Jonathan Tan
Message 4 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.