diff --git a/.changelog/4778.yml b/.changelog/4778.yml new file mode 100644 index 0000000000..114939cf0d --- /dev/null +++ b/.changelog/4778.yml @@ -0,0 +1,4 @@ +changes: +- description: Fixed an issue where the ***demisto-sdk validate*** command ran on the remote branch instead of the local current branch by default. + type: fix +pr_number: 4778 diff --git a/demisto_sdk/commands/common/git_util.py b/demisto_sdk/commands/common/git_util.py index ffb2c6e45a..e2e2012cd0 100644 --- a/demisto_sdk/commands/common/git_util.py +++ b/demisto_sdk/commands/common/git_util.py @@ -206,7 +206,7 @@ def is_file_exist_in_commit_or_branch( try: commit = self.get_commit(commit_or_branch, from_remote=from_remote) except CommitOrBranchNotFoundError: - logger.exception(f"Could not get commit {commit_or_branch}") + logger.debug(f"Could not get commit {commit_or_branch}") return False path = str(self.path_from_git_root(path)) diff --git a/demisto_sdk/commands/validate/initializer.py b/demisto_sdk/commands/validate/initializer.py index aeec237850..4111390311 100644 --- a/demisto_sdk/commands/validate/initializer.py +++ b/demisto_sdk/commands/validate/initializer.py @@ -515,9 +515,7 @@ def git_paths_to_basecontent_set( old_path = file_path if isinstance(file_path, tuple): file_path, old_path = file_path - obj = BaseContent.from_path( - file_path, git_sha=current_git_sha, raise_on_exception=True - ) + obj = BaseContent.from_path(file_path, raise_on_exception=True) if obj: obj.git_sha = current_git_sha obj.git_status = git_status