RFR: pr: use LinkedHashSet for CommitCommentsWorkItem
ehelin at openjdk.java.net
Fri Mar 19 08:35:15 UTC 2021
please review this patch that uses a `LinkedHashSet` instead of a regular `HashSet` for storing the hashes associated with a certain commit message title for the `CommitCommandsWorkItem`. This will increase the likelihood for `GitLabRepository.commitWithComment` finding the commit quicker, since `GitRepository.commitMetadataFor` will return metadata with the most recent commit first and the `LinkedHashSet` will return elements in insertion order when iterating over it. The effect is that `GitLabRepository.commitWithComment` will consider the candidates in chronological order with the most recent candidate first. This maps well to how contributors are likely to use commit commands - it will most likely be rare that someone makes a commit command on a very old commit.
- pr: use LinkedHashSet for CommitCommentsWorkItem
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Fetch: git fetch https://git.openjdk.java.net/skara pull/1081/head:pull/1081
More information about the skara-dev