Files
gerrit/java/com
Youssef Elghareeb 1197795661 Fix comment context for git submodule files
If comment context is requested for a git submodule file, an exception
is thrown in CommentContextLoader because the object type is not a blob.
This change fixes this case. Since this check was also done by the Get
Diff endpoint, I extracted the logic in a common class that can be
reused by both classes.

I also added a test for this case in CommentContextIT. The logic for the
private methods (creating a project, pushing a change) is copied from
SubmoduleSubscriptionIT. This is better than subclassing
SubmoduleSubscriptionIT since the shared logic between the two classes
is very small.

Change-Id: Ibbfa00212386322d70289ed8077d84357083e0c8
2021-03-09 13:07:37 +01:00
..