Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

What is this add-on for?

Submodule Changes for Bitbucket helps visualize modified lines of code in commits and pull requests for repositories with submodules.

While working with Git submodules, there's a common problem with showing changes that are made to the submodule in the Diff tab. It displays two commit hashes instead of actually modified files and LOC. It's especially inconvenient when it comes to reviewing pull requests.

Image Added

Submodule Changes for Bitbucket app helps watch changes committed to a submodule in a standard Bitbucket Diff view as if they're committed to the super-repository. It also gives an ability to watch Blame leave comments for more convenient pull requests review. 

Image Added

Submodule Changes for Bitbucket also gives an ability to watch Blame, leave comments on the entire pull request, a particular file, or on specific lines of code in a file for more convenient pull requests review. 

Image Added

There are several exceptions when the app doesn't show changes committed to a submodule:

  • When a submodule is placed not in the current Bitbucket instance
  • When a submodule is just added or deleted in shown changes
  • When there is a submodule conflict

Submodule Changes for Bitbucket includes a merge check Submodules fast-forward merge to ensure that all submodules can be merged to the default branch in fast-forward mode. If we didn't merge the submodule before merging the super-repository, we'd be able to do it afterward in fast-forward mode, and the link to the submodule will remain unchanged.

Merge-check must first be enabled in the project or repository settings.

Merge check restrictions:

  • Merge check is performed only at the first level of a submodule, and nested submodules will not be checked
  • Merge check only works for submodules hosted in Bitbucket it's been enabled in
  • Merge check may skip submodules that are a part of truncated changes when the changes list is too big to be shown

How to install and configure the app?

To install Submodule Changes for Bitbucket, log into your Bitbucket Server as Administrator and install Submodule Changes for Bitbucket directly from Atlassian Marketplace or by file upload. 

The app doesn't require any configuration. Once installed, the changes apply to the Diff tab for commits and pull requests with updates to a submodule. 

How to turn off the app for a certain submodule?

In some cases, the number of changes in a pull request with a submodule can exceed the page.max.changes limit. For instance, when a dependency on some large project is used as a submodule. That resulted in an incomplete displaying of changes in the pull request diff view.

To disable the Submodule Changes for Bitbucket app for a specific submodule in a repository, you need to add a special property in the .gitmodules file using the following Git command:

Code Block
git config --file .gitmodules submodule.<name>.ignoreChanges true

In this command, <name> is the submodule name specified in the [submodule "<name>"] section of the .gitmodules file. The changes will be applied after you commit and push them. 

Ex.: if you have a submodule named "library", the .gitmodules file will be the following:

Code Block
[submodule "library"]
path = library
url = https://bitbucket.company.com/scm/sm/library.git

In this case, your command that will turn off the app for this submodule will be:

Code Block
git config --file .gitmodules submodule.library.ignoreChanges true

As a result, the .gitmodules file will change like this:

Code Block
[submodule "library"]
path = library
url = https://bitbucket.company.com/scm/sm/library.git
ignoreChanges = true
Tip
titleWelcome to your new space!

Confluence spaces are great for sharing content and news with your team. This is your home page. Right now it shows recent space activity, but you can customize this page in any way you like.

Complete these tasks to get started

  •  Edit this home page - Click Edit in the top right of this screen to customize your Space home page
  •  Create your first page - Click the Create button in the header to get started
  •  Brand your Space - Click Configure Sidebar in the left panel to update space details and logo
  •  Set permissions - Click Space Tools in the left sidebar to update permissions and give others access

 

Recent space activity

Recently Updated
typespage, comment, blogpost
max5
hideHeadingtrue
themesocial

Space contributors

Contributors
modelist
scopedescendants
limit5
showLastTimetrue
orderupdate

...