Verify that git status is clean with no uncommitted changes.
(self)
| 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).""" |