~vcs-imports/egit/master

Viewing all changes in revision 3902.

  • Committer: Thomas Wolf
  • Date: 2018-06-18 10:07:52 UTC
  • Revision ID: git-v1:76d3d8b89bcaab1a42dfe1d70bca6f330b8291dc
Fix CommitUI.getSelectedFiles()

This method is used to restrict the files that can be potentially
committed to those covered by the user's resource selection. If a
container is selected, all modified files under that container are
to be included in a commit.

Previous code started off with the modified files as known in git,
then tried to figure out which resource such a file was in Eclipse,
and then checked if that resource was contained by any of the selected
resources. It failed to reliably identify matches when a file appeared
as several resources in the Eclipse resource tree.

The new code swaps the logic around. It starts with the resource
selection and finds the repository-relative paths for all, and then
filters the modified files as known in git.

Bug: 535796
Change-Id: I0b77876ed3913cac987a07444c9de1e6a43e69ee
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: