MCPcopy Create free account
hub / github.com/apache/burr / _check_git_working_tree

Function _check_git_working_tree

scripts/apache_release.py:224–240  ·  view source on GitHub ↗

Check git working tree status and warn if dirty.

()

Source from the content-addressed store, hash-verified

222
223
224def _check_git_working_tree() -> None:
225 """Check git working tree status and warn if dirty."""
226 try:
227 dirty = (
228 subprocess.check_output(["git", "status", "--porcelain"], stderr=subprocess.DEVNULL)
229 .decode()
230 .strip()
231 )
232 if dirty:
233 print("⚠️ Warning: Git working tree has uncommitted changes:")
234 for line in dirty.splitlines()[:10]:
235 print(f" {line}")
236 if len(dirty.splitlines()) > 10:
237 print(f" ... and {len(dirty.splitlines()) - 10} more files")
238 print()
239 except subprocess.CalledProcessError:
240 pass
241
242
243# ============================================================================

Callers 3

_build_sdist_from_gitFunction · 0.85
cmd_archiveFunction · 0.85
cmd_allFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected