Alternate repo commit: link wrong when automatically added from a commit message
Added by Olivier Mehani almost 10 years ago.
Updated about 9 years ago.
When adding some markup, in a commit message, containing an issue number, Redmine updates this issue with a link to the commit.
However, when this commit shows up in a repo which is not the main one for that project, the
commit: link is not formatted properly, and reads
REPONAME|commit:SHA instead of
An example can be found at 
Looking at how Redmine formats svn links (
PROJECT:REPONAME|rREV), I am starting to think that the commit link-generation is good, but the parsing is not.
The link generation creates something of the forrm
PROJECT:REPONAME|commit:SHA, while the parsing expects
PROJECT:commit:REPONAME|SHA. Trying to map SVN URLs to Git urls,
commit: as the equivalent of
r, which I call
ID as an SCM-independent commit ID, this gives the following:
- Git (generated):
- Git (parsing):
The SVN and Git (generated) schemas perfectly match, but are at odds with Git (parsing).
I'd say the problem is therefore in the parsing code, rather than the code generator.
I can confirm this bug. I have the same problem with git.
Working links are as expected:
commit:COMMITID - for default repo
But automatic generated links for non default repo is:
The patch looks good for me, I'll test that
Same problem, the patch seems to work fine.
- Status changed from New to Closed
- Resolution set to Duplicate
- Is duplicate of Defect #13544: Commit reference: autogenerated issue note has wrong commit link syntax in multi-repo or cross-project context added
Also available in: Atom