-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* git copy: get * git copy: copy * unit tests * target help message: a directory; create target if not exists * Use SecurePath * fix path type * review fixes * Refactor stage.get * assert in callback * SecurePath: make file type assertions public * Review fixes
- Loading branch information
1 parent
4789196
commit 836653e
Showing
8 changed files
with
256 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
from snowflake.cli.api.sql_execution import SqlExecutionMixin | ||
from snowflake.cli.plugins.object.stage.manager import StageManager | ||
from snowflake.connector.cursor import SnowflakeCursor | ||
|
||
|
||
class GitManager(SqlExecutionMixin): | ||
def show_branches(self, repo_name: str): | ||
class GitManager(StageManager): | ||
def show_branches(self, repo_name: str) -> SnowflakeCursor: | ||
query = f"show git branches in {repo_name}" | ||
return self._execute_query(query) | ||
|
||
def show_tags(self, repo_name: str): | ||
def show_tags(self, repo_name: str) -> SnowflakeCursor: | ||
query = f"show git tags in {repo_name}" | ||
return self._execute_query(query) | ||
|
||
def show_files(self, repo_path: str): | ||
def show_files(self, repo_path: str) -> SnowflakeCursor: | ||
query = f"ls {repo_path}" | ||
return self._execute_query(query) | ||
|
||
def fetch(self, repo_name: str): | ||
def fetch(self, repo_name: str) -> SnowflakeCursor: | ||
query = f"alter git repository {repo_name} fetch" | ||
return self._execute_query(query) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.