import tempfile
from fastcore.test import test_eqAPI
Implementation of fastgit
Imports
callgit
callgit (path, *args, split=None, uname=None)
get_top
get_top (folder)
with tempfile.TemporaryDirectory() as td:
test_eq(get_top(td), None)
msg = callgit(td, 'init')
assert get_top(td) in msgGit represents a python wrapper for the git command. It will execute every command as if git were being run with the working directory being the directory d passed in at init time.
As a result, callers should take care not to checkout a branch which does not have the directory used to initialize Git.
Git
Git (d)
Initialize self. See help(type(self)) for accurate signature.
with tempfile.TemporaryDirectory() as td:
g = Git(td)
assert not g.exists
msg = g.init()
assert g.top() in msgGit.last_commit
Git.last_commit ()