{"thread":{"id":"18342","subject":"[PATCH] config: test for --replace-all with one argument and fix documentation.","startedAt":"2009-03-17T09:46:37Z","lastAt":"2009-03-17T11:12:55Z","messageCount":5,"participants":["Carlos Rica","Johannes Schindelin","Felipe Contreras","Uwe Kleine-König"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"108203","messageId":"1237283197.10001.9.camel@equipo-loli","threadId":"18342","inReplyTo":null,"subject":"[PATCH] config: test for --replace-all with one argument and fix documentation.","fromName":"Carlos Rica","fromEmail":"jasampler@gmail.com","sentAt":"2009-03-17T09:46:37Z","receivedAt":"2009-03-17T09:46:37Z","isPatch":true,"sender":{"key":"jasampler@gmail.com","avatar":null},"body":"Option --replace-all only allows at least two arguments, so\ndocumentation was needing to be updated accordingly. A test showing\nthat the command fails with only one parameter is also provided.\n\nSigned-off-by: Carlos Rica <jasampler@gmail.com>\n---\n\nThis is applied on top of current pu, using the Felipe\nContreras changes for adding parse-options to git-config.\n\n Documentation/git-config.txt |    2 +-\n builtin-config.c             |    2 +-\n t/t1300-repo-config.sh       |    9 ++++++++-\n 3 files changed, 10 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\nindex 82ce89e..7131ee3 100644\n--- a/Documentation/git-config.txt\n+++ b/Documentation/git-config.txt\n@@ -11,7 +11,7 @@ SYNOPSIS\n [verse]\n 'git config' [<file-option>] [type] [-z|--null] name [value [value_regex]]\n 'git config' [<file-option>] [type] --add name value\n-'git config' [<file-option>] [type] --replace-all name [value [value_regex]]\n+'git config' [<file-option>] [type] --replace-all name value [value_regex]\n 'git config' [<file-option>] [type] [-z|--null] --get name [value_regex]\n 'git config' [<file-option>] [type] [-z|--null] --get-all name [value_regex]\n 'git config' [<file-option>] [type] [-z|--null] --get-regexp name_regex [value_regex]\ndiff --git a/builtin-config.c b/builtin-config.c\nindex 1a3baa1..d8da72c 100644\n--- a/builtin-config.c\n+++ b/builtin-config.c\n@@ -55,7 +55,7 @@ static struct option builtin_config_options[] = {\n \tOPT_BIT(0, \"get\", &actions, \"get value: name [value-regex]\", ACTION_GET),\n \tOPT_BIT(0, \"get-all\", &actions, \"get all values: key [value-regex]\", ACTION_GET_ALL),\n \tOPT_BIT(0, \"get-regexp\", &actions, \"get values for regexp: name-regex [value-regex]\", ACTION_GET_REGEXP),\n-\tOPT_BIT(0, \"replace-all\", &actions, \"replace all matching variables: name [value [value_regex]\", ACTION_REPLACE_ALL),\n+\tOPT_BIT(0, \"replace-all\", &actions, \"replace all matching variables: name value [value_regex]\", ACTION_REPLACE_ALL),\n \tOPT_BIT(0, \"add\", &actions, \"adds a new variable: name value\", ACTION_ADD),\n \tOPT_BIT(0, \"unset\", &actions, \"removes a variable: name [value-regex]\", ACTION_UNSET),\n \tOPT_BIT(0, \"unset-all\", &actions, \"removes all matches: name [value-regex]\", ACTION_UNSET_ALL),\ndiff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh\nindex 3c06842..9c81e04 100755\n--- a/t/t1300-repo-config.sh\n+++ b/t/t1300-repo-config.sh\n@@ -118,7 +118,14 @@ EOF\n \n test_expect_success 'multiple unset is correct' 'cmp .git/config expect'\n \n-mv .git/config2 .git/config\n+cp .git/config2 .git/config\n+\n+test_expect_success '--replace-all missing value' '\n+\ttest_must_fail git config --replace-all beta.haha &&\n+\ttest_cmp .git/config2 .git/config\n+'\n+\n+rm .git/config2\n \n test_expect_success '--replace-all' \\\n \t'git config --replace-all beta.haha gamma'\n-- \n1.6.0.5\n"},{"id":"108207","messageId":"alpine.DEB.1.00.0903171123530.6393@intel-tinevez-2-302","threadId":"18342","inReplyTo":"1237283197.10001.9.camel@equipo-loli","subject":"Re: [PATCH] config: test for --replace-all with one argument and fix documentation.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-17T10:24:38Z","receivedAt":"2009-03-17T10:24:38Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 17 Mar 2009, Carlos Rica wrote:\n\n> Option --replace-all only allows at least two arguments, so\n> documentation was needing to be updated accordingly. A test showing\n> that the command fails with only one parameter is also provided.\n> \n> Signed-off-by: Carlos Rica <jasampler@gmail.com>\n\nLooks obviously correct to me.  I am actually unsure if I can ACK this \npatch, as most of builtin-config.c does not look all that familiar to me \nanymore ;-)\n\nCiao,\nDscho\n"},{"id":"108212","messageId":"94a0d4530903170341g27f215d4t8c3ad25e7f362590@mail.gmail.com","threadId":"18342","inReplyTo":"alpine.DEB.1.00.0903171123530.6393@intel-tinevez-2-302","subject":"Re: [PATCH] config: test for --replace-all with one argument and fix documentation.","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-03-17T10:41:29Z","receivedAt":"2009-03-17T10:41:29Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Tue, Mar 17, 2009 at 12:24 PM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> Hi,\n>\n> On Tue, 17 Mar 2009, Carlos Rica wrote:\n>\n>> Option --replace-all only allows at least two arguments, so\n>> documentation was needing to be updated accordingly. A test showing\n>> that the command fails with only one parameter is also provided.\n>>\n>> Signed-off-by: Carlos Rica <jasampler@gmail.com>\n>\n> Looks obviously correct to me.  I am actually unsure if I can ACK this\n> patch, as most of builtin-config.c does not look all that familiar to me\n> anymore ;-)\n\nHehe... interesting, my first possibility of ack'ing :D (I guess)\n\nAcked-by: Felipe Contreras <felipe.contreras@gmail.com>\n\n-- \nFelipe Contreras\n"},{"id":"108215","messageId":"20090317110227.GA2666@pengutronix.de","threadId":"18342","inReplyTo":"94a0d4530903170341g27f215d4t8c3ad25e7f362590@mail.gmail.com","subject":"Re: [PATCH] config: test for --replace-all with one argument and fix documentation.","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2009-03-17T11:02:27Z","receivedAt":"2009-03-17T11:02:27Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello,\n\nOn Tue, Mar 17, 2009 at 12:41:29PM +0200, Felipe Contreras wrote:\n> On Tue, Mar 17, 2009 at 12:24 PM, Johannes Schindelin\n> <Johannes.Schindelin@gmx.de> wrote:\n> > Hi,\n> >\n> > On Tue, 17 Mar 2009, Carlos Rica wrote:\n> >\n> >> Option --replace-all only allows at least two arguments, so\n> >> documentation was needing to be updated accordingly. A test showing\n> >> that the command fails with only one parameter is also provided.\n> >>\n> >> Signed-off-by: Carlos Rica <jasampler@gmail.com>\n> >\n> > Looks obviously correct to me.  I am actually unsure if I can ACK this\n> > patch, as most of builtin-config.c does not look all that familiar to me\n> > anymore ;-)\n> \n> Hehe... interesting, my first possibility of ack'ing :D (I guess)\n> \n> Acked-by: Felipe Contreras <felipe.contreras@gmail.com>\nIt's not nice to ack in public that someone else doesn't know something\nanymore. :-)\n\nSCNR\nUwe\n\n-- \nPengutronix e.K.                              | Uwe Kleine-König            |\nIndustrial Linux Solutions                    | http://www.pengutronix.de/  |\n"},{"id":"108221","messageId":"1b46aba20903170412u69041a71h3ccd97d0b61390d2@mail.gmail.com","threadId":"18342","inReplyTo":"alpine.DEB.1.00.0903171123530.6393@intel-tinevez-2-302","subject":"Re: [PATCH] config: test for --replace-all with one argument and fix documentation.","fromName":"Carlos Rica","fromEmail":"jasampler@gmail.com","sentAt":"2009-03-17T11:12:55Z","receivedAt":"2009-03-17T11:12:55Z","isPatch":true,"sender":{"key":"jasampler@gmail.com","avatar":null},"body":"On Tue, Mar 17, 2009 at 11:24 AM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> Hi,\n>\n> On Tue, 17 Mar 2009, Carlos Rica wrote:\n>\n>> Option --replace-all only allows at least two arguments, so\n>> documentation was needing to be updated accordingly. A test showing\n>> that the command fails with only one parameter is also provided.\n>>\n>> Signed-off-by: Carlos Rica <jasampler@gmail.com>\n>\n> Looks obviously correct to me.  I am actually unsure if I can ACK this\n> patch, as most of builtin-config.c does not look all that familiar to me\n> anymore ;-)\n\nThank you Johannes, I think that you don't need to do it in this\npatch, I talked before with Junio and Felipe for this, and I think\nthat Junio is also following the whole change (my change here is not\ncomparable with the work of Felipe).\n\nI just added you because Felipe Contreras said that you made some\nsuggestions to make this use of parse options possible.\n\nSee you!\n"}]}