mirror of
https://github.com/karen07/openwrt-mesh-builder.git
synced 2026-08-04 13:31:54 +00:00
16 lines
390 B
Python
Executable file
16 lines
390 B
Python
Executable file
#!/usr/bin/env python3
|
|
"""Small Git helpers backed by the `git` Unix tool."""
|
|
|
|
import sys
|
|
|
|
sys.dont_write_bytecode = True
|
|
from pathlib import Path
|
|
|
|
try:
|
|
from .process import output_or_none
|
|
except ImportError:
|
|
from process import output_or_none
|
|
|
|
|
|
def git_short(cwd: Path | None = None) -> str:
|
|
return output_or_none(["git", "rev-parse", "--short", "HEAD"], cwd=cwd) or "unknown"
|