{"thread":{"id":"18611","subject":"[PATCH 3/4] bisect: fix reading more than one path in \"$GIT_DIR/BISECT_NAMES\"","startedAt":"2009-03-29T09:44:57Z","lastAt":"2009-03-31T05:36:42Z","messageCount":3,"participants":["Christian Couder","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"109757","messageId":"20090329114457.c6fca0fe.chriscool@tuxfamily.org","threadId":"18611","inReplyTo":null,"subject":"[PATCH 3/4] bisect: fix reading more than one path in \"$GIT_DIR/BISECT_NAMES\"","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2009-03-29T09:44:57Z","receivedAt":"2009-03-29T09:44:57Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"The implementation of \"read_bisect_paths\" worked with only one\npath in each line of \"$GIT_DIR/BISECT_NAMES\", but the paths are all\nstored on one line by \"git-bisect.sh\".\n\nSo we have to process all the paths that may be on each line.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n bisect.c |   14 +++++++-------\n 1 files changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/bisect.c b/bisect.c\nindex 9e779c1..66df05f 100644\n--- a/bisect.c\n+++ b/bisect.c\n@@ -435,17 +435,17 @@ void read_bisect_paths(void)\n \t\tdie(\"Could not open file '%s': %s\", filename, strerror(errno));\n \n \twhile (strbuf_getline(&str, fp, '\\n') != EOF) {\n-\t\tchar *quoted, *dequoted;\n+\t\tchar *quoted;\n+\t\tint res;\n+\n \t\tstrbuf_trim(&str);\n \t\tquoted = strbuf_detach(&str, NULL);\n-\t\tif (!*quoted)\n-\t\t\tcontinue;\n-\t\tdequoted = sq_dequote(quoted);\n-\t\tif (!dequoted)\n+\t\tres = sq_dequote_to_argv(quoted, &rev_argv,\n+\t\t\t\t\t &rev_argv_nr, &rev_argv_alloc);\n+\t\tif (res)\n \t\t\tdie(\"Badly quoted content in file '%s': %s\",\n \t\t\t    filename, quoted);\n-\t\tALLOC_GROW(rev_argv, rev_argv_nr + 1, rev_argv_alloc);\n-\t\trev_argv[rev_argv_nr++] = dequoted;\n+\t\tfree(quoted);\n \t}\n \n \tstrbuf_release(&str);\n-- \n1.6.2.1.404.gb0085.dirty\n"},{"id":"109850","messageId":"7vocvjh25n.fsf@gitster.siamese.dyndns.org","threadId":"18611","inReplyTo":"20090329114457.c6fca0fe.chriscool@tuxfamily.org","subject":"Re: [PATCH 3/4] bisect: fix reading more than one path in \"$GIT_DIR/BISECT_NAMES\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-30T07:59:16Z","receivedAt":"2009-03-30T07:59:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Couder <chriscool@tuxfamily.org> writes:\n\n> The implementation of \"read_bisect_paths\" worked with only one\n> path in each line of \"$GIT_DIR/BISECT_NAMES\", but the paths are all\n> stored on one line by \"git-bisect.sh\".\n>\n> So we have to process all the paths that may be on each line.\n\nThis is \"oops, the previous one is broken\", for a series that was not yet\n'next' worthy, so I squashed the fix and rebuilt the topic, together with\nyour other patches.\n\nThe series now looks like this:\n\n  $ git log --oneline --boundary master..cc/bisect-filter\n  b54809a bisect--helper: string output variables together with \"&&\"\n  fd5a6a8 rev-list: pass \"int flags\" as last argument of \"show_bisect_vars\"\n  e2c52e1 t6030: test bisecting with paths\n  56fac26 bisect: use \"bisect--helper\" and remove \"filter_skipped\" function\n  650bafa bisect: implement \"read_bisect_paths\" to read paths in \"$GIT_DIR/BISECT_NAMES\"\n  a79b083 bisect--helper: implement \"git bisect--helper\"\n  29adb27 quote: add \"sq_dequote_to_argv\" to put unwrapped args in an argv array\n  ccc12f5 quote: implement \"sq_dequote_many\" to unwrap many args in one string\n  a292c81 rev-list: call new \"filter_skip\" function\n  58f0b66 rev-list: pass \"revs\" to \"show_bisect_vars\"\n  41440cf rev-list: make \"show_bisect_vars\" non static\n  a650efd rev-list: move code to show bisect vars into its own function\n  2bc0667 rev-list: move bisect related code into its own file\n  7cc17b8 rev-list: make \"bisect_list\" variable local to \"cmd_rev_list\"\n  52ffe77 refs: add \"for_each_bisect_ref\" function\n  -89fbda2 Merge branch 'maint'\n\nI've tweaked a few patches before applying, but they all looked basically\nsane.  Unless I hear from other people in a few days , I'd say we merge it\nto 'next' and start cooking it.\n\nThanks.\n"},{"id":"109966","messageId":"200903310736.42366.chriscool@tuxfamily.org","threadId":"18611","inReplyTo":"7vocvjh25n.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 3/4] bisect: fix reading more than one path in \"$GIT_DIR/BISECT_NAMES\"","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2009-03-31T05:36:42Z","receivedAt":"2009-03-31T05:36:42Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Le lundi 30 mars 2009, Junio C Hamano a écrit :\n> Christian Couder <chriscool@tuxfamily.org> writes:\n> > The implementation of \"read_bisect_paths\" worked with only one\n> > path in each line of \"$GIT_DIR/BISECT_NAMES\", but the paths are all\n> > stored on one line by \"git-bisect.sh\".\n> >\n> > So we have to process all the paths that may be on each line.\n>\n> This is \"oops, the previous one is broken\", for a series that was not yet\n> 'next' worthy, so I squashed the fix and rebuilt the topic, together with\n> your other patches.\n\nNo problem.\n\n> The series now looks like this:\n\n[...]\n\n> I've tweaked a few patches before applying, but they all looked basically\n> sane.  Unless I hear from other people in a few days , I'd say we merge\n> it to 'next' and start cooking it.\n\nThanks,\nChristian.\n"}]}