ronaldorcampos commented on code in PR #63814:
URL: https://github.com/apache/airflow/pull/63814#discussion_r3026974168
##########
providers/git/src/airflow/providers/git/bundles/git.py:
##########
@@ -123,16 +123,37 @@ def _is_pruned_worktree(self) -> bool:
return False
return not (self.repo_path / ".git").exists()
+ def _local_repo_has_version(self) -> bool:
+ """Check if the local repo already has the correct version checked
out."""
+ if not self.version or not self.repo_path.is_dir() or not
(self.repo_path / ".git").exists():
+ return False
+ try:
+ repo = Repo(self.repo_path)
+ has_version = repo.head.commit.hexsha == self.version
+ repo.close()
+ return has_version
Review Comment:
good call
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]