From: Christian Couder <chriscool@tuxfamily.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, John Tapsell <johnflux@gmail.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: [PATCH 3/4] bisect: fix reading more than one path in "$GIT_DIR/BISECT_NAMES"
Date: Sun, 29 Mar 2009 11:44:57 +0200 [thread overview]
Message-ID: <20090329114457.c6fca0fe.chriscool@tuxfamily.org> (raw)
The implementation of "read_bisect_paths" worked with only one
path in each line of "$GIT_DIR/BISECT_NAMES", but the paths are all
stored on one line by "git-bisect.sh".
So we have to process all the paths that may be on each line.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
bisect.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/bisect.c b/bisect.c
index 9e779c1..66df05f 100644
--- a/bisect.c
+++ b/bisect.c
@@ -435,17 +435,17 @@ void read_bisect_paths(void)
die("Could not open file '%s': %s", filename, strerror(errno));
while (strbuf_getline(&str, fp, '\n') != EOF) {
- char *quoted, *dequoted;
+ char *quoted;
+ int res;
+
strbuf_trim(&str);
quoted = strbuf_detach(&str, NULL);
- if (!*quoted)
- continue;
- dequoted = sq_dequote(quoted);
- if (!dequoted)
+ res = sq_dequote_to_argv(quoted, &rev_argv,
+ &rev_argv_nr, &rev_argv_alloc);
+ if (res)
die("Badly quoted content in file '%s': %s",
filename, quoted);
- ALLOC_GROW(rev_argv, rev_argv_nr + 1, rev_argv_alloc);
- rev_argv[rev_argv_nr++] = dequoted;
+ free(quoted);
}
strbuf_release(&str);
--
1.6.2.1.404.gb0085.dirty
next reply other threads:[~2009-03-29 9:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-29 9:44 Christian Couder [this message]
2009-03-30 7:59 ` [PATCH 3/4] bisect: fix reading more than one path in "$GIT_DIR/BISECT_NAMES" Junio C Hamano
2009-03-31 5:36 ` Christian Couder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090329114457.c6fca0fe.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johnflux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).