Re: [PATCH] Fix regression in fast-import.c due to strbufs.
- From
Pierre Habouzit <madcoder@debian.org>
- Date
- Oct 26, 2007, 17:25 UTC
- Message-ID
- <20071026172523.GB5496@artemis.corp>
- In-Reply-To
- <20071026075912.GA25365@artemis.corp>
Dear Shun, the fast-import bug your reported has a fix.
Dear Junio, please merge the patch in the mail I'm answering to[0] into master as it fixes a crash in fast-import.
Cheers,
[0] Message-Id: <20071026075912.GA25365@artemis.corp>
diff --git a/fast-import.c b/fast-import.c index 6f888f6..f93d7d6 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1616,6 +1616,7 @@ static void cmd_data(struct strbuf *sb) char *term = xstrdup(command_buf.buf + 5 + 2); size_t term_len = command_buf.len - 5 - 2; + strbuf_detach(&command_buf, NULL); for (;;) { if (strbuf_getline(&command_buf, stdin, '\n') == EOF) die("EOF in data (terminator '%s' not found)", term);
-- 1.5.3.4.1358.gfae55-dirty -- ·O· Pierre Habouzit ··O madcoder@debian.org OOO http://www.madism.org