You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ATM relies on git log -1 per file to extract information about each file. I wonder if it might be more efficient to implement it through "parsing" git log --stats thus going through the history until all files in the tree are covered. To avoid parsing of git log I thought that may be libgit could be used.
here is ipython history where I investigated how to go through history of commits and get to "stats" per each commit:
In [26]: history
import rich
import pygit2
repo = pygit2.Repository('.')
c = next(repo.walk(repo.head.target))
rich.inspect(c)
pygit2.diff(c.hex)
repo.diff(c.hex)
diffstat = repo.diff(c.hex)
rich.inspect(diffstat)
rich.inspect(diffstat.stats)
rich.inspect(diffstat.deltas)
rich.inspect(next(diffstat.deltas))
c.hex
rich.inspect(c)
diffstat = repo.diff(c.hex, c.parents[0].hex)
rich.inspect(next(diffstat.deltas))
rich.inspect(next(diffstat.stats))
rich.inspect(next(diffstat))
rich.inspect(diffstat)
rich.inspect(diffstat.stats)
rich.inspect(next(diffstat.stats))
rich.inspect(next(diffstat.deltas))
rich.inspect(next(diffstat.deltas).new_file)
history
The text was updated successfully, but these errors were encountered:
ATM relies on
git log -1
per file to extract information about each file. I wonder if it might be more efficient to implement it through "parsing"git log --stats
thus going through the history until all files in the tree are covered. To avoid parsing ofgit log
I thought that may be libgit could be used.here is ipython history where I investigated how to go through history of commits and get to "stats" per each commit:
The text was updated successfully, but these errors were encountered: