merge-request-integration icon indicating copy to clipboard operation
merge-request-integration copied to clipboard

target branch not refreshed on subsequent code reviews

Open bironran opened this issue 4 years ago • 1 comments

  1. enable "checkout target branch when doing code review".
  2. "code review" an MR for a branch you have not seen before. The branch will be created locally. finish code review.
  3. update the branch in the remote repository by another user.
  4. git fetch, then "code review" the MR again. Expected: the code (you have not seen before and have not checked out manually) is updated to the latest. Actual: the code is not updated but the MR diff is. This leads to broken code searches where you assume the code you have is the latest but it isn't.

If this was a branch you worked on yourself, it would make sense. But if this is a branch you didn't manually checked out, it's confusing.

I see two options here:

  1. checkout the MR last commit instead of a branch. this will also have the side effects of not creating a local branch to clean up after and of telling you when you need to fetch (adding "fetch if needed" here would be great). I think this is the preferred option.
  2. delete local branches automatically created by "code review" process when code review is done but only if they were not present before the code review process started. For completeness and as a 2nd priority, also do that on quitting IntelliJ / closing the project.

bironran avatar Oct 29 '20 22:10 bironran

This is an absolute deal killer for us, too often it happens that the user is not reviewing the latest changes.

blejdfist avatar Nov 19 '20 12:11 blejdfist