-
Notifications
You must be signed in to change notification settings - Fork 715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct author attribution for RCheckin Quick #357
Conversation
- Common checks are still in the base method - 'Quick' specific code is in _PerformRCheckinQuick - the non-Quick code is in _PferformRCheckin
+ Refactored PerformRCheckin to remove duplicate code
I'm must say that, from a personal point of view, even if it's very good to refactor to delete duplicate code, I'm not very pleased by this rcheckin refactor :( I have 2 consequent development that do big modifications in the PerformRCheckin() method : #353 and #355 There is another thing that bother me. It's that we have 2 ways to perform rcheckin. But that's a team decision... All that to say that I'm not very pleased to see that refactor happens NOW :( |
Feel free to reject this pull request, if the refactoring doesn't fit into your plans. I do not need the quick version for my project, I only implemented this because of your request. It's just that I got confused by the existing code and did this to minimize the possibility of errors creeping in trying to keep the duplicate code consistent. Also, if you look at the code, not a lot of things have changed; it should be easy to apply whatever change you did to this updated version - or not. |
OK. We will see how it turns (which merge first and which must be adapted. If that's not difficult, I will try to do it...). Because the objective is to have the 2 merged ;) Because your fix really make sense when we use a bare repository (and rcheckin in bare repository use quick version. The normal version was unadaptable!) |
@pmiossec - I'll let you make the call on which order to merge these. |
@spraints After a careful review of what have been done in this pull request and some tries at merging things, there should be no big problems. So, I'm 👍 to merge that first. @l3m |
I'll try to make some time to review it this week. (I keep trying to look at it at the end of the day, or when I only have a couple of minutes, and that's not going to work.) |
To help you for the review, this is far easier in this case to review commit by commit, because :
Nothing scary... PS : And One day, I think we should discuss about removing one of the 2 rcheckin methods (because there are doing the same thing, now). My heart goes to the quick version, that is the quicker ;) and the only one useable in a bare repository (next to come...) |
I think I like the quick one better, but honestly I don't know that code very well, so it's just a gut feeling at this point. |
Correct author attribution for RCheckin Quick
Thanks for your patience. 😄 |
I extended the code for correct author attribution (#336) and refactored some duplicate existing code.
Open Questions
RCheckinCommit is in the RCheckin.cs file. I am not sure where to put it; can it stay, or in Utils? What would you suggest?
There's still some ugliness in Util/CommitSpecificCheckinOptionsFactory. I directly create and load the authors file. It's the only 'new AuthorsFile' outside of unit tests, I assume this is because of your DI framework. How can I solve this better?