Skip to content

Show changes in submodules in PR #25888

Closed
@mikaeleimantlab

Description

@mikaeleimantlab

Feature Description

It would be very useful to be able to see changes made in submodules when reviewing a PR, instead of just seeing the changed submodule commit hash.

This is supported by git using the git diff --submodule=diff main option, which I'm guessing means that the changes needed on the Gitea end would be relatively small: submodule contents would need to be fetched and the diff command tweaked.

I imagine this would be an option to enable (per repo, per org or globally?).

Example (cleaned for readability) output from git diff as it used by Gitea now:

README.md:
+
+And now we've added a sub repo, to see how that works.

sub-repo:
-Subproject commit 773e95df076c02e982bea7eb745866e92e0cfcfb
+Subproject commit 4326ed282c7f5bd49fd4a29c1ac0f414d25d71b9

Example output using git diff --submodule=diff:

README.md:
+
+And now we've added a sub repo, to see how that works.

sub-repo/README.md:
+# Sub repo
+
+Test av hur Gitea hanterar ändringar i sub-repon.

This would make it a lot easier to review all the changes for a PR of the parent repo in a single view, instead of manually having to navigate separate PRs for each submodule. Especially in projects using many submodules, this saves a lot of time and mental effort.

You would still need to create PRs for merging the changes for each submodule into their respective main branches, but at least the review can be performed efficiently for the overall work before performing those PRs.

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detailtype/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions