summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
Diffstat (limited to 'project.py')
-rw-r--r--project.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/project.py b/project.py
index 6fce0e442..a2786e4b5 100644
--- a/project.py
+++ b/project.py
@@ -1667,6 +1667,12 @@ class Project:
1667 if not self.Exists: 1667 if not self.Exists:
1668 return False 1668 return False
1669 1669
1670 # Local changes can't be checked without a worktree, and pruning drops
1671 # every reflog. Sync_LocalHalf() recreates the worktree, so a later
1672 # sync can decide.
1673 if not self.worktree or not platform_utils.isdir(self.worktree):
1674 return False
1675
1670 if self._CheckForImmutableRevision(use_superproject=use_superproject): 1676 if self._CheckForImmutableRevision(use_superproject=use_superproject):
1671 return False 1677 return False
1672 1678
@@ -3914,9 +3920,9 @@ class Project:
3914 f"{self.name} cherry-pick {rev} ", project=self.name 3920 f"{self.name} cherry-pick {rev} ", project=self.name
3915 ) 3921 )
3916 3922
3917 def _LsRemote(self, refs): 3923 def _LsRemote(self, refs: str) -> Optional[str]:
3918 cmd = ["ls-remote", self.remote.name, refs] 3924 cmd = ["ls-remote", self.remote.name, refs]
3919 p = GitCommand(self, cmd, capture_stdout=True) 3925 p = GitCommand(self, cmd, bare=True, capture_stdout=True)
3920 if p.Wait() == 0: 3926 if p.Wait() == 0:
3921 return p.stdout 3927 return p.stdout
3922 return None 3928 return None