https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112018-02-13T11:51:56ZRuby Issue Tracking SystemRuby master - Misc #14470: Use Commit together with co-authors Github feature in svn commitshttps://bugs.ruby-lang.org/issues/14470?journal_id=703122018-02-13T11:51:56Zshevegen (Robert A. Heiler)shevegen@gmail.com
<ul></ul><p>I think the ruby core team and/or matz has to decide on attribution.<br>
It can probably be done in SVN as-is, without depending on git/github.</p>
<p>I was a bit confused about the initial wording of the suggestion,<br>
but then I looked at the link, and it was contribution e. g.<br>
<strong>documentation</strong>, so I understand if some people may want to have<br>
better attribution of work/time investment there, if they want<br>
to. (I personally don't mind either way, but I can understand if<br>
some others, for whatever reason, may want to have more<br>
attribution for anything that is a non-trivial addition. E. g.<br>
typo corrections ... would these need attribution? That would<br>
seem a bit overkill. But it's fine for improving documentation,<br>
since that will also help other people who learn/use ruby)</p> Ruby master - Misc #14470: Use Commit together with co-authors Github feature in svn commitshttps://bugs.ruby-lang.org/issues/14470?journal_id=703132018-02-13T14:50:56Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>Why doesn't Github see <code>From:</code> header too?</p> Ruby master - Misc #14470: Use Commit together with co-authors Github feature in svn commitshttps://bugs.ruby-lang.org/issues/14470?journal_id=703142018-02-13T16:12:23Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>The feature page says "Include your trailers at the end of your commit message", does it work even if "git-svn-id:" line is appended by <code>git svn dcommit</code>?</p> Ruby master - Misc #14470: Use Commit together with co-authors Github feature in svn commitshttps://bugs.ruby-lang.org/issues/14470?journal_id=703162018-02-13T19:18:32Ztenderlovemaking (Aaron Patterson)tenderlove@ruby-lang.org
<ul></ul><p>nobu (Nobuyoshi Nakada) wrote:</p>
<blockquote>
<p>The feature page says "Include your trailers at the end of your commit message", does it work even if "git-svn-id:" line is appended by <code>git svn dcommit</code>?</p>
</blockquote>
<p>It will work, but we have to ensure there is no newline between the git-svn-id trailer and the Co-authored-by trailer. I just did a test with a test SVN repository, and it looks like git-svn will insert a newline even if there are trailers at the end of the commit message. Perhaps we could fix "git-svn", but it doesn't look like we can add arbitrary git trailers today.</p> Ruby master - Misc #14470: Use Commit together with co-authors Github feature in svn commitshttps://bugs.ruby-lang.org/issues/14470?journal_id=703202018-02-13T23:11:48Znormalperson (Eric Wong)normalperson@yhbt.net
<ul></ul><p><a href="mailto:tenderlove@ruby-lang.org" class="email">tenderlove@ruby-lang.org</a> wrote:</p>
<blockquote>
<p>nobu (Nobuyoshi Nakada) wrote:</p>
<blockquote>
<p>The feature page says "Include your trailers at the end of<br>
your commit message", does it work even if "git-svn-id:"<br>
line is appended by <code>git svn dcommit</code>?</p>
</blockquote>
<p>It will work, but we have to ensure there is no newline<br>
between the git-svn-id trailer and the Co-authored-by trailer.<br>
I just did a test with a test SVN repository, and it looks<br>
like git-svn will insert a newline even if there are trailers<br>
at the end of the commit message. Perhaps we could fix<br>
"git-svn", but it doesn't look like we can add arbitrary git<br>
trailers today.</p>
</blockquote>
<p>I wouldn't accept such a change to git-svn (explanation below).<br>
Better to make trailer interpretation tolerate empty lines;<br>
as trailers are a loose format, anyways (or filter out<br>
git-svn-id: lines before interpreting trailers).</p>
<p>Since the earliest incarnations of git-svn in 2006, I've strived<br>
to maintain deterministic behavior across git versions as long<br>
as the same options (usually defaults) are used; so SHA-1<br>
identifiers for commits could end up being identical (and thus<br>
shareable) between contributors who previously had no contact.</p> Ruby master - Misc #14470: Use Commit together with co-authors Github feature in svn commitshttps://bugs.ruby-lang.org/issues/14470?journal_id=703432018-02-14T17:30:12Ztenderlovemaking (Aaron Patterson)tenderlove@ruby-lang.org
<ul></ul><p>normalperson (Eric Wong) wrote:</p>
<blockquote>
<p><a href="mailto:tenderlove@ruby-lang.org" class="email">tenderlove@ruby-lang.org</a> wrote:</p>
<blockquote>
<p>nobu (Nobuyoshi Nakada) wrote:</p>
<blockquote>
<p>The feature page says "Include your trailers at the end of<br>
your commit message", does it work even if "git-svn-id:"<br>
line is appended by <code>git svn dcommit</code>?</p>
</blockquote>
<p>It will work, but we have to ensure there is no newline<br>
between the git-svn-id trailer and the Co-authored-by trailer.<br>
I just did a test with a test SVN repository, and it looks<br>
like git-svn will insert a newline even if there are trailers<br>
at the end of the commit message. Perhaps we could fix<br>
"git-svn", but it doesn't look like we can add arbitrary git<br>
trailers today.</p>
</blockquote>
<p>I wouldn't accept such a change to git-svn (explanation below).<br>
Better to make trailer interpretation tolerate empty lines;<br>
as trailers are a loose format, anyways (or filter out<br>
git-svn-id: lines before interpreting trailers).</p>
<p>Since the earliest incarnations of git-svn in 2006, I've strived<br>
to maintain deterministic behavior across git versions as long<br>
as the same options (usually defaults) are used; so SHA-1<br>
identifiers for commits could end up being identical (and thus<br>
shareable) between contributors who previously had no contact.</p>
</blockquote>
<p>Thanks for the background! Maybe we can get this fixed in git then. I'll see what I can find out!</p> Ruby master - Misc #14470: Use Commit together with co-authors Github feature in svn commitshttps://bugs.ruby-lang.org/issues/14470?journal_id=703442018-02-14T17:43:00Zbrianmario (Brian Lopez)seniorlopez@gmail.com
<ul></ul><p>normalperson (Eric Wong) wrote:</p>
<blockquote>
<p><a href="mailto:tenderlove@ruby-lang.org" class="email">tenderlove@ruby-lang.org</a> wrote:</p>
<blockquote>
<p>nobu (Nobuyoshi Nakada) wrote:</p>
<blockquote>
<p>The feature page says "Include your trailers at the end of<br>
your commit message", does it work even if "git-svn-id:"<br>
line is appended by <code>git svn dcommit</code>?</p>
</blockquote>
<p>It will work, but we have to ensure there is no newline<br>
between the git-svn-id trailer and the Co-authored-by trailer.<br>
I just did a test with a test SVN repository, and it looks<br>
like git-svn will insert a newline even if there are trailers<br>
at the end of the commit message. Perhaps we could fix<br>
"git-svn", but it doesn't look like we can add arbitrary git<br>
trailers today.</p>
</blockquote>
<p>I wouldn't accept such a change to git-svn (explanation below).<br>
Better to make trailer interpretation tolerate empty lines;<br>
as trailers are a loose format, anyways (or filter out<br>
git-svn-id: lines before interpreting trailers).</p>
<p>Since the earliest incarnations of git-svn in 2006, I've strived<br>
to maintain deterministic behavior across git versions as long<br>
as the same options (usually defaults) are used; so SHA-1<br>
identifiers for commits could end up being identical (and thus<br>
shareable) between contributors who previously had no contact.</p>
</blockquote>
<p>fwiw GitHub's implementation of trailer parsing is based on the rules defined by git-interpret-trailers. Which for parsing, are as follows:</p>
<blockquote>
<p>Existing trailers are extracted from the input message by looking for a group of one or more lines that (i) are all trailers, or (ii) contains at least one Git-generated or user-configured trailer and consists of at least 25% trailers. The group must be preceded by one or more empty (or whitespace-only) lines. The group must either be at the end of the message or be the last non-whitespace lines before a line that starts with ---. Such three minus signs start the patch part of the message.</p>
</blockquote>
<p>As such, as @tenderlove just pointed out, making it so the git-svn trailers are included in that list would require changes to git (and libgit2) and would break the existing trailer format. We can certainly propose a patch but I'm not confident it'll be accepted.</p>
<blockquote>
<p>Better to make trailer interpretation tolerate empty lines;<br>
as trailers are a loose format</p>
</blockquote>
<p>It's true individual trailer lines are a lose format, but the definition for what a block of trailer(s) is, is not. That said, I fully understand the situation you're in. Changing the behavior in git-svn would come with its own trade-offs as well. Tricky...</p> Ruby master - Misc #14470: Use Commit together with co-authors Github feature in svn commitshttps://bugs.ruby-lang.org/issues/14470?journal_id=703462018-02-14T17:47:04Ztenderlovemaking (Aaron Patterson)tenderlove@ruby-lang.org
<ul></ul><p>brianmario (Brian Lopez) wrote:</p>
<blockquote>
<blockquote>
<p>Better to make trailer interpretation tolerate empty lines;<br>
as trailers are a loose format</p>
</blockquote>
<p>It's true individual trailer lines are a lose format, but the definition for what a block of trailer(s) is, is not. That said, I fully understand the situation you're in. Changing the behavior in git-svn would come with its own trade-offs as well. Tricky...</p>
</blockquote>
<p>I guess as a user I would expect git-svn to be additive; if there are no trailers in my commit message, then add them (for the id), otherwise add the id trailer to the trailers I specified.</p> Ruby master - Misc #14470: Use Commit together with co-authors Github feature in svn commitshttps://bugs.ruby-lang.org/issues/14470?journal_id=703792018-02-15T10:18:04Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>brianmario (Brian Lopez) wrote:</p>
<blockquote>
<p>fwiw GitHub's implementation of trailer parsing is based on the rules defined by git-interpret-trailers. Which for parsing, are as follows:</p>
</blockquote>
<p>Thank you for the info.<br>
<code>git-interpret-trailers</code> seems to accept <code>git-svn</code> trailer.</p>
<pre><code>$ git cat-file commit @ | git interpret-trailers --parse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</code></pre>
<p>But <code>git-svn</code> seems not using <code>git-interpret-trailers</code>, <a href="https://github.com/ruby/ruby/commit/6593c3af8d9490687180ae7f413561a41d5547d5" class="external">https://github.com/ruby/ruby/commit/6593c3af8d9490687180ae7f413561a41d5547d5</a></p>
<p>So what we can do is to send a patch to <code>git-svn</code> for <code>git-interpret-trailers</code>, I think.<br>
We need Perl Mongers.</p> Ruby master - Misc #14470: Use Commit together with co-authors Github feature in svn commitshttps://bugs.ruby-lang.org/issues/14470?journal_id=706862018-02-26T22:11:20Zgreggzst (Grzegorz Jakubiak)
<ul></ul><p>+1 for this idea. I've got one pull request waiting to be merged and I'd love to be listed as a real contributor to ruby.</p> Ruby master - Misc #14470: Use Commit together with co-authors Github feature in svn commitshttps://bugs.ruby-lang.org/issues/14470?journal_id=777312019-04-23T11:55:18Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Today, We move to Git from Subversion.</p>
<p><a href="https://www.ruby-lang.org/en/news/2019/04/23/move-to-git-from-svn/" class="external">https://www.ruby-lang.org/en/news/2019/04/23/move-to-git-from-svn/</a></p>
<p>We can keep your original commit now.</p>