FindCommitByChangesetId should look in a specific Tfs branch - enhacements#9
Conversation
hazzik
commented
Jun 19, 2015
- Resolve TODO on Checkout command
- Correctly cache changesets
Correctly cache changesets
GitTfs/Core/GitRepository.cs
Outdated
There was a problem hiding this comment.
I don't like a lot this solution which consist in travelling along a lot of commit to construct a list and then filter this list with the tfs path :( Because that's not very good in terms of performance...
I'm pretty shure that we can write a private method that take an optional path and :
- if the path is not empty, return immediatly if the commit with the good id and path is found
- if the path is empty, continue to look for this specific changeset id through all the commits
This method could be wrapped in 2 public methods one which accept a tfs path and one another without...
There was a problem hiding this comment.
Because that's not very good in terms of performance...
Most of the cases there will be only one commit in the list, so no performance issues.
There was a problem hiding this comment.
if the path is not empty, return immediatly if the commit with the good id and path is found
if the path is empty, continue to look for this specific changeset id through all the commits
We can not do this, because then changesetsCache will be corrupted, eg. some commits will never be found.
b0fa78f to
a1cb1c2
Compare
|
@pmiossec I've changed the solutions. Now it has 2 methods: one which accepts As I understad, this is what you have suggested. |