Skip to content

Commit

Permalink
git: inline switch when reference changes
Browse files Browse the repository at this point in the history
There is no need to move the workspace to attic if the reference or dissociate
are changed.
  • Loading branch information
rhubert committed Nov 13, 2023
1 parent ae4ea8f commit 1f4992d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pym/bob/scm/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,9 @@ def canSwitch(self, oldSpec):

# Filter irrelevant properties
diff -= {"sslVerify", 'singleBranch', 'shallow',
'shallowSubmodules', "useBranchAndCommit"}
'shallowSubmodules', "useBranchAndCommit",
"references", "dissociate"}

diff = set(prop for prop in diff if not prop.startswith("remote-"))

# Enabling "submodules" and/or "recurseSubmodules" is ok. The
Expand Down

0 comments on commit 1f4992d

Please sign in to comment.