Skip to content

Changes count remain zero (0) while creating new MR from fork

Summary

This happens on GitLab.com as well on GitLab CE latest version. Changes count remain zero (0) while creating new MR from fork.

Steps to reproduce

  1. Clone any repo, I choose GitLab.com repo
git clone git@gitlab.com:gitlab-org/gitlab-shell.git
  1. Fork this repo and add remote
cd gitlab-shell
git remote rename origin upstream
git remote add origin git@gitlab.com:savitojs/gitlab-shell.git

Showing remotes:

git remote -v

origin	git@gitlab.com:savitojs/gitlab-shell.git (fetch)
origin	git@gitlab.com:savitojs/gitlab-shell.git (push)
upstream	git@gitlab.com:gitlab-org/gitlab-shell.git (fetch)
upstream	git@gitlab.com:gitlab-org/gitlab-shell.git (push)
  1. Create a branch and make changes to code or any file
git checkout -b patch-2
echo ">  Nothing there, just testing if MR commit changes count works." >> README.md
  1. Push to upstream
git commit -am "Testing changes count works in MR on GitLab.com"
git push origin patch-2
  1. Navigate to GitLab.com WebUI, Create a MR and notice if Changes have recorded any changes, See screenshot at bottom.

Screenshot_from_2020-06-29_14-54-26

Example Project

https://gitlab.com/savitojs/gitlab-shell

What is the current bug behavior?

Changes count remain zero (0) while creating new MR from fork.

What is the expected correct behavior?

Changes count should show the number of changes in the MR.

Relevant logs and/or screenshots

Same as step 5.

Output of checks

This bug happens on GitLab.com