Beispiel #1
0
 def has_pending_changes(self) -> bool:
     repo, origin = git.get_repo(self.dependency.url, self.dest_dir)
     return repo.is_dirty(untracked_files=True)
Beispiel #2
0
 def get_current_head(self) -> str:
     repo, origin = git.get_repo(self.dependency.url, self.dest_dir)
     return repo.active_branch.name
Beispiel #3
0
 def get_latest_ref(self) -> str:
     repo, origin = git.get_repo(self.dependency.url, self.dest_dir)
     git.fetch(origin, self.dependency.head)
     return git.get_latest_ref(origin, self.dependency.head)
Beispiel #4
0
 def get_current_ref(self) -> str:
     repo, origin = git.get_repo(self.dependency.url, self.dest_dir)
     return repo.head.commit.hexsha
Beispiel #5
0
 def pull(self) -> None:
     repo, origin = git.get_repo(self.dependency.url, self.dest_dir)
     git.fetch(origin, self.dependency.head)
     git.checkout(repo, origin, self.dependency.head, self.dependency.ref)