bugfix: verificar si la rama grupo trackea una rama remota antes de hacer pull
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import subprocess
|
||||
|
||||
from git_flow import GitFlowError
|
||||
from git_flow.io import *
|
||||
|
||||
|
||||
@@ -80,6 +81,13 @@ class Git:
|
||||
def is_repository() -> bool:
|
||||
return Git("rev-parse", is_inside_work_tree=True).code() == 0
|
||||
|
||||
@staticmethod
|
||||
def get_tracking_branch(branch: str) -> str | None:
|
||||
try:
|
||||
return Git("rev-parse", branch + "@{upstream}", abbrev_ref=True).firstline()
|
||||
except subprocess.CalledProcessError:
|
||||
return None
|
||||
|
||||
def __init__(self, subcommand: str, *args: str, **kwargs: str | int | bool | list[str] | None) -> None:
|
||||
self.command = ["git", subcommand]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user