示例#1
0
def date_from_git_objects(run, objects: Iterable[str]) -> List[int]:
    cmd = show(objects=objects, diff=False, format='%at')
    proc = run(cmd)
    stdout = proc_to_stdout(proc)
    return list(int(line) for line in stdout)
示例#2
0
def test_show_format():
    assert show(format="%at") == ["git", "show", "--format=%at"]
示例#3
0
def test_show_objects():
    assert show(objects=('master',
                         'feature')) == ["git", "show", "master", "feature"]
示例#4
0
def test_show_no_diff():
    assert show(diff=False) == ["git", "show", "-s"]
示例#5
0
def test_show():
    assert show() == ["git", "show"]