Add initial parser for git trees

It doesn't actually parse the files themselves, but it does walk the
object tree and print out the dives and trips it finds.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Linus Torvalds 2014-03-06 19:27:28 -08:00 committed by Dirk Hohndel
parent 6d0011947b
commit cc3a184adf
5 changed files with 303 additions and 1 deletions

4
file.c
View file

@ -356,6 +356,10 @@ static void parse_file_buffer(const char *filename, struct memblock *mem, char *
if (!mem->size || !mem->buffer)
return;
if (mem->size > 3 && !memcmp(mem->buffer, "git", 3)) {
git_load_dives(mem->buffer);
return;
}
parse_xml_buffer(filename, mem->buffer, mem->size, &dive_table, NULL, error);
}