Coding style.

- Moved the git tools into tools.toml.
This commit is contained in:
Andrew Hamilton 2018-06-04 07:55:37 +10:00
parent c62cc22505
commit 3bc142bec6
2 changed files with 14 additions and 22 deletions

View file

@ -596,28 +596,6 @@ def pil_half(path):
return Status.normal, result
@deps(deps={"git"}, url="https://git-scm.com/docs/git-blame",
executables={"git"})
def git_blame(path): # FIX: Add to tools_test.py
stdout, stderr, returncode = _do_command(
["git", "blame", "--show-stats", "--date=short", path])
if returncode == 0:
return Status.normal, fill3.Text(stdout)
else:
return Status.not_applicable, fill3.Text("")
@deps(deps={"git"}, url="https://git-scm.com/docs/git-log",
executables={"git"})
def git_log(path):
stdout, stderr, returncode = _do_command(
["git", "log", "--find-renames", "--follow", "--stat", path])
if returncode == 0:
return Status.normal, fill3.Text(stdout)
else:
return Status.not_applicable, fill3.Text("")
@deps(deps={"golang-golang-x-tools"}, url="golang-golang-x-tools",
executables={"godoc"})
def godoc(path):

View file

@ -34,6 +34,20 @@ tools_for_extensions = [
"aiff", "aifc", "au", "iff", "flv"], ["mediainfo"]],
]
[git_blame]
dependencies = ["git"]
url = "https://git-scm.com/docs/git-blame"
command = "git blame --show-stats --date=short"
success_status = "normal"
error_status = "not_applicable"
[git_log]
dependencies = ["git"]
url = "https://git-scm.com/docs/git-log"
command = "git log --find-renames --follow --stat"
success_status = "normal"
error_status = "not_applicable"
[objdump_headers]
dependencies = ["binutils"]
url = "https://en.wikipedia.org/wiki/Objdump"