The gimp-data submodule

Hi,

A new feature of GIMP v3 is the gimp-data submodule. Here is an attempt to understand it:

The gimp-data directory in the GIMP master branch is a submodule that links to a particular commit in another repository, the gimp-data repo. Typically, developers update the gimp-data repo and then update the main repo to point to the new commit. This keeps the submodule synchronized with the main repository.

When you fetch the latest changes from the master branch, you also need to update the submodule, as it might point to a new commit. Failure to do so may result in a build failure.

There is also a file .gitmodules that specifies the location of the submodule repository:

[submodule "gimp-data"]
path = gimp-data
url = https://gitlab.gnome.org/GNOME/gimp-data.git
shallow = true

This file allows you to configure the submodule to point to a different repository, such as a clone of gimp-data where you can make custom changes like adding new icons. After making changes and pushing them to this new repo, you then build and test GIMP to ensure that the gimp-data changes work correctly. Once everything is verified, you can push your updated version of GIMP to your repo, keeping both the gimp-data and GIMP versions synchronized.

If you later rebase to the GIMP master branch, and it expects a commit or a file from gimp-data that isn’t available in your submodule, the build process may fail.

The key is to keep the main repo and the gimp-data submodule synchronized. When rebasing your GIMP branch, you should also rebase your submodule repo to incorporate any necessary updates. If you find this process complex and error-prone, you’re not alone. If you think it’s simple, hats off! :slight_smile:

I had an issue with this process, and writing this explanation helped resolve it. I’ll post it in case others have suggestions, corrections, or additional insights.

1 Like

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.