()
| 12 | |
| 13 | |
| 14 | def has_unpushed_commits() -> bool: |
| 15 | try: |
| 16 | result = subprocess.run( |
| 17 | ["git", "rev-list", "--count", "@{u}..HEAD"], capture_output=True, text=True, check=True |
| 18 | ) |
| 19 | return int(result.stdout.strip()) > 0 |
| 20 | except subprocess.CalledProcessError: |
| 21 | return False |