{"thread":{"id":"4081","subject":"Re: [PATCH] Another config file parsing fix.","startedAt":"2006-05-06T18:25:11Z","lastAt":"2006-05-06T21:01:31Z","messageCount":3,"participants":["sean","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"19611","messageId":"BAYC1-PASMTP08FCAC8B8FB768ED1791F1AEAA0@CEZ.ICE","threadId":"4081","inReplyTo":"20060506141402.3909cb37.seanlkml@sympatico.ca","subject":"Re: [PATCH] Another config file parsing fix.","fromName":"sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-05-06T18:25:11Z","receivedAt":"2006-05-06T18:25:11Z","isPatch":true,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Sat, 6 May 2006 14:14:02 -0400\nsean <seanlkml@sympatico.ca> wrote:\n\n> If the variable we need to store should go into a section\n> that currently only has a single variable (not matching\n> the one we're trying to insert), we will already be into\n> the next section before we notice we've bypassed the correct\n> location to insert the variable.\n> \n> To handle this case we store the current location as soon\n> as we find a variable matching the section of our new\n> variable.\n> \n    \nSorry.. this should really be amended to mention that it was Linus\nwho spotted the problem.\n\n\nSean\n"},{"id":"19612","messageId":"BAYC1-PASMTP090EE19E31F9EEBD579719AEAA0@CEZ.ICE","threadId":"4081","inReplyTo":"BAYC1-PASMTP08FCAC8B8FB768ED1791F1AEAA0@CEZ.ICE","subject":"[PATCH] t1300-repo-config: two new config parsing tests.","fromName":"sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-05-06T19:43:43Z","receivedAt":"2006-05-06T19:43:43Z","isPatch":true,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"\n- correctly insert a new variable into a section that only\n  contains a single (different) variable.\n\n- correctly insert a new section that matches the initial\n  substring of an existing section.\n\nSigned-off-by: Sean Estabrooks <seanlkml@sympatico.ca>\n\n\n---\n\nBoth tests fail with v1.3.2 and pass with latest patches.\n\n\n t/t1300-repo-config.sh |   31 +++++++++++++++++++++++++++++++\n 1 files changed, 31 insertions(+), 0 deletions(-)\n\nef2178a10e27f43d4120884bc587c460e9b1bfcb\ndiff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh\nindex 1bf728f..0914be2 100755\n--- a/t/t1300-repo-config.sh\n+++ b/t/t1300-repo-config.sh\n@@ -278,5 +278,36 @@ git-repo-config > output 2>&1\n test_expect_success 'no arguments, but no crash' \\\n \t\"test $? = 129 && grep usage output\"\n \n+cat > .git/config << EOF\n+[a.b]\n+\tc = d\n+EOF\n+\n+git-repo-config a.x y\n+\n+cat > expect << EOF\n+[a.b]\n+\tc = d\n+[a]\n+\tx = y\n+EOF\n+\n+test_expect_success 'new section is partial match of another' 'cmp .git/config expect'\n+\n+git-repo-config b.x y\n+git-repo-config a.b c\n+\n+cat > expect << EOF\n+[a.b]\n+\tc = d\n+[a]\n+\tx = y\n+\tb = c\n+[b]\n+\tx = y\n+EOF\n+\n+test_expect_success 'new variable inserts into proper section' 'cmp .git/config expect'\n+\n test_done\n \n-- \n1.3.2.gd777c\n"},{"id":"19615","messageId":"Pine.LNX.4.63.0605062300530.4155@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4081","inReplyTo":"BAYC1-PASMTP08FCAC8B8FB768ED1791F1AEAA0@CEZ.ICE","subject":"Re: [PATCH] Another config file parsing fix.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-05-06T21:01:31Z","receivedAt":"2006-05-06T21:01:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 6 May 2006, sean wrote:\n\n> On Sat, 6 May 2006 14:14:02 -0400\n> sean <seanlkml@sympatico.ca> wrote:\n> \n> > If the variable we need to store should go into a section\n> > that currently only has a single variable (not matching\n> > the one we're trying to insert), we will already be into\n> > the next section before we notice we've bypassed the correct\n> > location to insert the variable.\n> > \n> > To handle this case we store the current location as soon\n> > as we find a variable matching the section of our new\n> > variable.\n> > \n>     \n> Sorry.. this should really be amended to mention that it was Linus\n> who spotted the problem.\n\nThanks to both of you!\n\nCiao,\nDscho\n"}]}