import tempfile
from fastcore.test import test_eqAPI
Implementation of fastgit
Imports
callgit
def callgit(
path, args:VAR_POSITIONAL, split:NoneType=None, uname:NoneType=None
):
get_top
def 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
def 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
def last_commit(
):