简体   繁体   中英

Show differences of file that has been moved and changed in pull request in azure devops web UI

Imagine you use git and have to review a pull request in which you have a file X1 containing one class (eg C#) and one method. Now it was moved from one project P1 or folder to another P2 (which would change the namespace) and another method was added to this class.

Now reviewing this pull request in azure devops web UI it will show the deletion of this file X1 in the one project P1 and the addition of a new file X2 with the same name in another project P2. In the pull request it will show this X2 file as entirely new and will highlight the entire class. If I want to know what the author actually changed in the code, then I would have manually to compare the files X1 and X2, which of course becomes more and more painstaking as code lines increase.

Is there a possibility to filter the changes in the code that are real changes? and not only due to the change of the file path and namespace?

Or is it dependent on the change that has been made to the class, whether it will be classified as a new file or a renamed/moved file?

I clicked through all option that I could find on the UI but I get the feeling it's kinda hopeless.

There is no direct way to do this. But yes you can do one thing.

First, move the file in a commit and then modify the file on the new location, this way it will be tacked by GIT and you can see the diff between the two commits easily.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM