How to traverse git repository at the lower level (than git log) -


wanted know how go through list of commits (or single branch) in git. how git log (pointers part of codes cool too, don't know start)? can on raw filesystem somehow?

reasoning is: need write tool in other language doesn't need call system command.

update: i've read git internals: git objects (and following chapters), understand there packfiles. main problem have understand what's going on when run: git rev-list --all. or - single branch - same command without --all flag. git figures out head, pulls it's object store, checks parents' shas, pulls object store , one? or there other, faster method?

not sure if have come across this: libgit2 : https://github.com/libgit2/libgit2

libgit2 portable, pure c implementation of git core methods provided re-entrant linkable library solid api, allowing write native speed custom git applications in language bindings.

its open source, browsing through code, should give valuable inputs.. e.g: commit.c


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -