mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
6d0011947b
commit
cc3a184adf
5 changed files with 303 additions and 1 deletions
4
file.c
4
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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue