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

Re: [PATCH 2/2] After renaming a section, print any trailing variable definitions

From
Alex Vandiver <alex@chmrr.net>
Date
Jul 24, 2009, 22:26 UTC
Message-ID
<1248474081-sup-2762@utwig>
In-Reply-To
<20090725071105.6117@nanako3.lavabit.com>
At Fri Jul 24 18:11:05 -0400 2009, Nanako Shiraishi wrote:
Show 13 quoted lines
> Quoting Alex Vandiver <alex@chmrr.net>
> > diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
> > index 43ea283..8c43dcd 100755
> > --- a/t/t1300-repo-config.sh
> > +++ b/t/t1300-repo-config.sh
> > @@ -460,6 +460,28 @@ EOF
> >  test_expect_success "rename succeeded" "test_cmp expect .git/config"
> >  
> >  cat >> .git/config << EOF
> > +[branch "vier"] z = 1
> > +EOF
> 
> Isn't this a syntax error?

Nope -- at least, not according to both the code, and the tests (search or noNewline in t/t1300-repo-config.sh).

Though I also note that the documentation disagrees with the code in the following case:

    Each variable must belong to some section, which means that there
    must be a section header before the first setting of a variable.
  $ cat >bogus
  foo = 42
  $ git config --file bogus --list
  foo=42
  $ git config --file bogus --get foo
  42
 - Alex
-- 
Networking -- only one letter away from not working
Previous: Nanako ShiraishiNext: Alex Vandiver
Message 5 of 17 in “Section renaming can lose content”
  1. 0/2 Section renaming can lose contentAlex Vandiver, Jul 24, 2009
  2. 1/2 Make section_name_match start on '[', and return the length on successAlex Vandiver, Jul 24, 2009
  3. 2/2 After renaming a section, print any trailing variable definitionsAlex Vandiver, Jul 24, 2009
  4. Nanako ShiraishiJul 24, 2009
  5. Alex VandiverJul 24, 2009
  6. Make git config fail on variables with no section, as documentedAlex Vandiver, Jul 26, 2009
  7. Johannes SchindelinJul 26, 2009
  8. Alex VandiverJul 26, 2009
  9. Johannes SchindelinJul 26, 2009
  10. Alex VandiverJul 26, 2009
  11. Junio C HamanoJul 24, 2009
  12. (unknown)Nanako Shiraishi, Jul 25, 2009
  13. Johannes SchindelinJul 25, 2009
  14. Johannes SchindelinJul 25, 2009
  15. Alex VandiverJul 25, 2009
  16. Junio C HamanoJul 25, 2009
  17. Johannes SchindelinJul 25, 2009

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.