diff --git a/pbpy/pbgit.py b/pbpy/pbgit.py index 0f9d358..71ef7a4 100644 --- a/pbpy/pbgit.py +++ b/pbpy/pbgit.py @@ -159,7 +159,13 @@ def get_locked(key="ours", include_new=True): # also check untracked and added files if key == "ours" and include_new: proc = pbtools.run_with_combined_output( - [get_git_executable(), "status", "--porcelain", "-uall"] + [ + get_git_executable(), + "--no-optional-locks", + "status", + "--porcelain", + "-uall", + ] ) if not proc.returncode: for line in proc.stdout.splitlines(): @@ -394,7 +400,9 @@ def get_credentials(repo_str=None): def get_modified_files(paths=True): - proc = pbtools.run_with_output([get_git_executable(), "status", "--porcelain"]) + proc = pbtools.run_with_output( + [get_git_executable(), "--no-optional-locks", "status", "--porcelain"] + ) if paths: return {Path(line[3:]) for line in proc.stdout.splitlines()} return {line[3:] for line in proc.stdout.splitlines()} diff --git a/pbsync/__main__.py b/pbsync/__main__.py index 3dd8785..fe363de 100644 --- a/pbsync/__main__.py +++ b/pbsync/__main__.py @@ -517,15 +517,6 @@ def sync_handler(sync_val: str, repository_val=None): symbols_needed = pbunreal.is_versionator_symbols_enabled() pbunreal.clean_binaries_folder(not symbols_needed) - configured_branches = pbconfig.get("branches") - should_unlock_unmodified = ( - pbgit.get_current_branch_name() in configured_branches - ) - fix_attr_thread = threading.Thread( - target=pbgit.fix_lfs_ro_attr, args=(should_unlock_unmodified,) - ) - fix_attr_thread.start() - pblog.info("------------------") pblog.info("Checking for engine updates...") @@ -535,6 +526,15 @@ def sync_handler(sync_val: str, repository_val=None): f"Something went wrong while updating the uproject file. Please request help in {pbconfig.get('support_channel')}." ) + configured_branches = pbconfig.get("branches") + should_unlock_unmodified = ( + pbgit.get_current_branch_name() in configured_branches + ) + fix_attr_thread = threading.Thread( + target=pbgit.fix_lfs_ro_attr, args=(should_unlock_unmodified,) + ) + fix_attr_thread.start() + engine_version = pbunreal.get_engine_version_with_prefix() if engine_version is not None: pblog.info(