Skip to content

Fix project moved message after git operation

What does this MR do?

Ths MR fixed the project message shown after a git operation is performed on a repo with a different remote. When using resources with repositories different than projects, like wikis or personal snippets, the message shown is wrong. For example:

remote:
remote: Project 'root/test.wiki' was moved to 'root/test1'. <== Wrong project 'root/test.wiki'
remote:
remote: Please update your Git remote:
remote:
remote:   git remote set-url origin ssh://fran@127.0.0.1:2222/root/test1.git <== Wrong remote
remote:
remote:
remote: Project 'root/test/snippets/138' was moved to 'root/test1'. <== Wrong project 'root/test/snippets/138'
remote:
remote: Please update your Git remote:
remote:
remote:   git remote set-url origin http://127.0.0.1:3000/root/test1.git <== Wrong remote
remote:

The remote to set and the old project path would be the right. The new messages will be:

remote:
remote: Project 'root/test' was moved to 'root/test1'. 
remote:
remote: Please update your Git remote:
remote:
remote:   git remote set-url origin ssh://fran@127.0.0.1:2222/root/test1.wiki.git
remote:
remote:
remote: Project 'root/test' was moved to 'root/test1'. 
remote:
remote: Please update your Git remote:
remote:
remote:   git remote set-url origin http://127.0.0.1:3000/root/test1/snippets/138.git 
remote:

Closes #205646 (closed)

Does this MR meet the acceptance criteria?

Conformity

Edited by 🤖 GitLab Bot 🤖

Merge request reports