<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 18 Feb 2019, at 8:22 pm, Simon Peyton Jones <<a href="mailto:simonpj@microsoft.com" class="">simonpj@microsoft.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Go to the source code that you want to refer to, (Repository… Files for example, or even within an MR itself)… and you’ll notice if you hover on the LHS of any source code, next to the line numbers, that it has a little link icon. Clicking that will change the URL in the URL bar to refer to that place (you can also shift-click between two lines to create a range if that’s your particular proclivity). You can copy the link from the URL bar, and then paste it into the comment where you want to refer to the line of code in question.<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class="">My goal is to add a comment to a line in the MR that is not displayed by the MR<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class="">If the line is displayed, then yes I can do what you say. But it isn’t! <o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class="">Zooming off to the repository is not good because while I can get a link to the line, I can’t add a comment; I can only do that in the MR.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class="">Does that make sense?<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class="">Simon<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div></div></div></blockquote></div><br class=""><div class="">My apologies. I knew I couldn’t surely *actually* be able to help SPJ ;-) <grins> Sorry. Just a big fan.</div><div class=""><br class=""></div><div class="">I spent 30 minutes searching around and discovered the “special gitlab references” section, which I was only vaguely aware of: <a href="https://docs.gitlab.com/ee/user/markdown.html#special-gitlab-references" class="">https://docs.gitlab.com/ee/user/markdown.html#special-gitlab-references</a> but I couldn’t for the life of me find a way to do what we can do in github (quote sections of code into a general comment)</div><div class=""><br class=""></div><div class="">So, I often have this issue in github, too… sometimes I just want to refer to some file that’s not in the PR at all. My solution is usually to write a general comment, and in the comment, I just paste the link of whatever I want to refer to. It’s a bit naff. As you’re implying, we should be able to add a new comment on any file at all in a repository, *at the point in the version history that the repo was at when you wrote the comment*.</div><div class=""><br class=""></div><div class="">Tho, I’m not sure what they’d do to comments that got swept away with rebases and the like (which is probably why it’s not a feature). Might be worth suggesting as a feature.</div><div class=""><br class=""></div><div class="">Sorry I wasn’t more helpful,</div><div class="">Julian</div></body></html>