Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2020-11-15 21:40:33 +0000
committerThomas Wolf2020-11-23 10:03:28 +0000
commit65facc7e3afbe98ae75279e52905fe207c07e10e (patch)
tree06957cfdfae8de5dd39b3cfde77a1fb4aa566242 /org.eclipse.egit.mylyn.ui/.project
parent1efa170fd9adf3f6b61a2df6268bb62f4c0324cb (diff)
downloadegit-65facc7e3afbe98ae75279e52905fe207c07e10e.tar.gz
egit-65facc7e3afbe98ae75279e52905fe207c07e10e.tar.xz
egit-65facc7e3afbe98ae75279e52905fe207c07e10e.zip
Enable "Replace with HEAD" in more cases
The action was enabled only for RepositoryState.SAFE, meaning one could not use it during a rebase or merge. But actually that condition is unnecessarily restrictive; the operation can be allowed anytime provided the repository is not bare and has a HEAD. Improve the property testers to be able to express the condition "all selected items are in a repository, which is non-bare and has a head" efficiently: allow tester arguments to be prefixed by "!" to signify logical negation. Add a new property test for "hasHead". Then change the repository test in the enablement condition of the command from "isSafe" to "!isBare,hasHead". (Multiple arguments are ANDed.) Adapt the handler's isEnabled(), and add a UI test using "Replace with HEAD" to resolve a conflict. Bug: 568038 Change-Id: I7e586c3fa35d0c5b66c8d07a9504105d0765ce77 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.mylyn.ui/.project')
0 files changed, 0 insertions, 0 deletions

Back to the top