summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-01-10 18:33:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-01-10 18:33:36 (GMT)
commit3b9d69ec22b8821fecc44c07ea49adc749484335 (patch)
tree89993616989d8d5a43cbcf5a39ac651c70a2272f /builtin
parentf0f493ec58489c739839e8d257a04159889639c6 (diff)
parente228c1736f25c59cd6da51ed97e03ecd80a935e6 (diff)
downloadgit-3b9d69ec22b8821fecc44c07ea49adc749484335.zip
git-3b9d69ec22b8821fecc44c07ea49adc749484335.tar.gz
git-3b9d69ec22b8821fecc44c07ea49adc749484335.tar.bz2
Merge branch 'js/lift-parent-count-limit'
There is no reason to have a hardcoded upper limit of the number of parents for an octopus merge, created via the graft mechanism. * js/lift-parent-count-limit: Remove the line length limit for graft files
Diffstat (limited to 'builtin')
-rw-r--r--builtin/blame.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index 4916eb2..e44a6bb 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -1803,17 +1803,17 @@ static int prepare_lines(struct scoreboard *sb)
static int read_ancestry(const char *graft_file)
{
FILE *fp = fopen(graft_file, "r");
- char buf[1024];
+ struct strbuf buf = STRBUF_INIT;
if (!fp)
return -1;
- while (fgets(buf, sizeof(buf), fp)) {
+ while (!strbuf_getwholeline(&buf, fp, '\n')) {
/* The format is just "Commit Parent1 Parent2 ...\n" */
- int len = strlen(buf);
- struct commit_graft *graft = read_graft_line(buf, len);
+ struct commit_graft *graft = read_graft_line(buf.buf, buf.len);
if (graft)
register_commit_graft(graft, 0);
}
fclose(fp);
+ strbuf_release(&buf);
return 0;
}