MCPcopy Create free account
hub / github.com/apache/solr / validate_git_status

Method validate_git_status

dev-tools/scripts/validateChangelogs.py:142–159  ·  view source on GitHub ↗

Verify that git status is clean with no uncommitted changes.

(self)

Source from the content-addressed store, hash-verified

140 )
141
142 def validate_git_status(self) -> bool:
143 """Verify that git status is clean with no uncommitted changes."""
144 self.info_messages.append("Checking git status...")
145 result = self.run_git(["status", "--porcelain"], check=False)
146
147 if result.stdout.strip():
148 self.errors.append(
149 "Git status is not clean. Please commit or stash all changes:\n" +
150 result.stdout
151 )
152 return False
153
154 # Store current branch for later restoration
155 result = self.run_git(["rev-parse", "--abbrev-ref", "HEAD"])
156 self.current_branch = result.stdout.strip()
157
158 self.info_messages.append("✓ Git status is clean")
159 return True
160
161 def _find_apache_remote(self) -> Optional[str]:
162 """Find the official Apache Solr remote (matching 'apache' and 'solr' in URL)."""

Callers

nothing calls this directly

Calls 3

run_gitMethod · 0.95
stripMethod · 0.80
appendMethod · 0.65

Tested by

no test coverage detected