<-- Back

Version control history does not list any changes for a specific commit: [rejected] refs/notes/mx_metadata

Issue

A Git commit pushed from Studio Pro appears in the commit history with zero changes listed and/or no Mendix version specified, while the commit contained model changes.

The Studio Pro log files show the following errors during the push:

! [rejected] refs/notes/mx_metadata - refs/notes/mx_metadata (fetch first)
error: failed to push some refs
hint: Updates were rejected because the remote contains work that you do not have locally.
LibGit2Sharp.NonFastForwardException: cannot push because a reference that you are trying to update on the remote contains commits that are not present locally.
The latest revision revision notes metadata is incorrect. Git command line client has exited with code 1 error: no note found for object

Environment

  • Studio Pro v11.14.0 and older
  • Studio Pro v11.12.6 and older

Cause

Studio Pro stores commit metadata, such as the Mendix version and the list of changed documents, in a separate Git notes reference named refs/notes/mx_metadata. Studio Pro pushes this reference together with the branch.

The issue is caused by a race condition during the metadata update. When the notes reference on the remote repository is updated by another push at about the same time, for example when two team members commit close to each other, the remote notes reference contains commits that are not present locally. Git then rejects the push of the notes reference as a non-fast-forward update.

The push of the branch succeeds, so the commit and all model changes reach the remote repository, but the commit has no metadata. Studio Pro then displays the commit with zero changes or an unknown Mendix version.

Note that no model data is missing from the project. Only the metadata of the affected commit is missing, and the metadata does not change the behavior of the app. The affected commit has the following limitations:

  • The commit history does not list the changes made in the commit.
  • The commit is not deployable.

Solution / Workaround

To prevent the issue, upgrade Studio Pro to v11.15 or newer (or v11.12.7 or newer). 

If that is not possible, a deployable state can be restored by following these steps:

  1. Make a small change in the app, for example, edit a character in a README file.
  2. Commit and push the change from Studio Pro. The new commit contains metadata and is deployable.

If it is necessary to review which changes the affected commit contains, compare the commit with the previous one as follows:

  1. Create a branch from the commit before the affected commit.
  2. Create a second branch from the affected commit.
  3. Make a small change in the branch created from the commit before the affected commit.
  4. Merge the two branches. The merge shows the changes made in the affected commit.

Internal information related

  • 292404, 285500, 282231
  • SOLP-4060, SOLP-4100
  • C04JZDSNPLP/p1794818023113029

Additional information

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.