From cc3a184adfcf08744de1caf930430300656349a2 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 6 Mar 2014 19:27:28 -0800 Subject: 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 Signed-off-by: Dirk Hohndel --- file.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'file.c') diff --git a/file.c b/file.c index 302989408..826f3eb51 100644 --- a/file.c +++ b/file.c @@ -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); } -- cgit v1.2.3-70-g09d2