Fix incorrect breadcrumb output when any of last two path parts occur in previous parts
What does this MR do?
This MR fixes an issue with the breadcrumbs that appear above the repo tree and file view when browsing a repository. The breadcrumbs will display extra directories if the directory name is the same as either of the last two path components. This MR prevents that by looking at the index of the path component instead of comparing their contents to the last two components.
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process.
Edited by Yukai Li