{"thread":{"id":"12579","subject":"[PATCH] Fix dcommit, rebase when rewriteRoot is in use","startedAt":"2008-03-08T20:01:10Z","lastAt":"2008-03-08T22:04:18Z","messageCount":6,"participants":["John Goerzen","Junio C Hamano","Johannes Schindelin","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"71432","messageId":"1205006470-18882-1-git-send-email-jgoerzen@complete.org","threadId":"12579","inReplyTo":null,"subject":"[PATCH] Fix dcommit, rebase when rewriteRoot is in use","fromName":"John Goerzen","fromEmail":"jgoerzen@complete.org","sentAt":"2008-03-08T20:01:10Z","receivedAt":"2008-03-08T20:01:10Z","isPatch":true,"sender":{"key":"jgoerzen@complete.org","avatar":null},"body":"Problem described here:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/76561\n\nSigned-off-by: John Goerzen <jgoerzen@complete.org>\n---\n git-svn.perl |    7 ++++++-\n 1 files changed, 6 insertions(+), 1 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 9e2faf9..1195569 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -1540,9 +1540,14 @@ sub find_by_url { # repos_root and, path are optional\n \t\t\t                    $remotes->{$repo_id}->{$_});\n \t\t}\n \t\tmy $p = $path;\n+\t\tmy $rwr = rewrite_root({repo_id => $repo_id});\n \t\tunless (defined $p) {\n \t\t\t$p = $full_url;\n-\t\t\t$p =~ s#^\\Q$u\\E(?:/|$)## or next;\n+\t\t\tmy $z = $u;\n+\t\t\tif ($rwr) {\n+\t\t\t\t$z = $rwr;\n+\t\t\t}\n+\t\t\t$p =~ s#^\\Q$z\\E(?:/|$)## or next;\n \t\t}\n \t\tforeach my $f (keys %$fetch) {\n \t\t\tnext if $f ne $p;\n-- \n1.5.4.2\n\n"},{"id":"71442","messageId":"7v3ar1sz8x.fsf@gitster.siamese.dyndns.org","threadId":"12579","inReplyTo":"1205006470-18882-1-git-send-email-jgoerzen@complete.org","subject":"Re: [PATCH] Fix dcommit, rebase when rewriteRoot is in use","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-03-08T21:05:18Z","receivedAt":"2008-03-08T21:05:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"John Goerzen <jgoerzen@complete.org> writes:\n\n> Problem described here:\n>\n> http://thread.gmane.org/gmane.comp.version-control.git/76561\n>\n> Signed-off-by: John Goerzen <jgoerzen@complete.org>\n\nWhile I am sure Eric and git-svn users would appreciate a fix, please do\nnot write a commit log message like this.\n\nHaving a pointer to additional material is a very good practice, and will\nbe appreciated by the readers, but giving a pointer and nothing else means\nthat you are forcing your readers to hunt for out-of-line information.\n\nOne person who writes can spend an extra few minutes to summarize the\nissue, and it will save time and effort for hundreds of readers.\n\nIf what is written is worth being read by that many readers, that is, and\nin this case I am sure it is ;-).\n\n\n"},{"id":"71444","messageId":"200803081528.21295.jgoerzen@complete.org","threadId":"12579","inReplyTo":"7v3ar1sz8x.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Fix dcommit, rebase when rewriteRoot is in use","fromName":"John Goerzen","fromEmail":"jgoerzen@complete.org","sentAt":"2008-03-08T21:28:21Z","receivedAt":"2008-03-08T21:28:21Z","isPatch":true,"sender":{"key":"jgoerzen@complete.org","avatar":null},"body":"On Saturday 08 March 2008 3:05:18 pm Junio C Hamano wrote:\n> John Goerzen <jgoerzen@complete.org> writes:\n> > Problem described here:\n> >\n> > http://thread.gmane.org/gmane.comp.version-control.git/76561\n> >\n> > Signed-off-by: John Goerzen <jgoerzen@complete.org>\n>\n> While I am sure Eric and git-svn users would appreciate a fix, please do\n> not write a commit log message like this.\n>\n> Having a pointer to additional material is a very good practice, and will\n> be appreciated by the readers, but giving a pointer and nothing else means\n> that you are forcing your readers to hunt for out-of-line information.\n\nThanks for the note.  Some projects really hate long commit messages, and \nsome love them, and I wasn't sure what type of project this is.\n\nWould you like me to rewrite and re-submit this, or are you editing and \ncommitting?\n\n-- John\n"},{"id":"71445","messageId":"alpine.LSU.1.00.0803082231540.3975@racer.site","threadId":"12579","inReplyTo":"1205006470-18882-1-git-send-email-jgoerzen@complete.org","subject":"Re: [PATCH] Fix dcommit, rebase when rewriteRoot is in use","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-03-08T21:32:20Z","receivedAt":"2008-03-08T21:32:20Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 8 Mar 2008, John Goerzen wrote:\n\n> Problem described here:\n> \n> http://thread.gmane.org/gmane.comp.version-control.git/76561\n> \n> Signed-off-by: John Goerzen <jgoerzen@complete.org>\n\nThat is not a good commit message.\n\nHth,\nDscho\n"},{"id":"71446","messageId":"20080308215248.GB30702@hand.yhbt.net","threadId":"12579","inReplyTo":"200803081528.21295.jgoerzen@complete.org","subject":"Re: [PATCH] Fix dcommit, rebase when rewriteRoot is in use","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2008-03-08T21:52:48Z","receivedAt":"2008-03-08T21:52:48Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"John Goerzen <jgoerzen@complete.org> wrote:\n> On Saturday 08 March 2008 3:05:18 pm Junio C Hamano wrote:\n> > John Goerzen <jgoerzen@complete.org> writes:\n> > > Problem described here:\n> > >\n> > > http://thread.gmane.org/gmane.comp.version-control.git/76561\n> > >\n> > > Signed-off-by: John Goerzen <jgoerzen@complete.org>\n\nfor the actual code, not the commit message:\n\nAcked-by: Eric Wong <normalperson@yhbt.net>\n\n> > While I am sure Eric and git-svn users would appreciate a fix, please do\n> > not write a commit log message like this.\n> >\n> > Having a pointer to additional material is a very good practice, and will\n> > be appreciated by the readers, but giving a pointer and nothing else means\n> > that you are forcing your readers to hunt for out-of-line information.\n> \n> Thanks for the note.  Some projects really hate long commit messages, and \n> some love them, and I wasn't sure what type of project this is.\n\nWe are the latter :)\n\nOne thing I've found with distributed VCS is that it's easier and\nconvenient to write very detailed commit messages as documentation so I\ncan go back and reference them easily.\n\nAlso, the commit messages are written in the heat of the moment so the\ncode is fresh in my mind rather than going back at the end and then\nwriting more documentation/comments later on.  With this synchronous\nbehavior, the commit message will always valid for that particular\nchangeset.\n\nProbably due to my workflow, I've always found asynchronously maintained\ncode and documentation to be quite difficult and documentation always\ndragged behind.\n\n> Would you like me to rewrite and re-submit this, or are you editing and \n> committing?\n\nI'd prefer it'd be straight from the patch author's mouth/fingers :)\n\nThanks John,\n\n-- \nEric Wong\n"},{"id":"71447","messageId":"200803081604.18675.jgoerzen@complete.org","threadId":"12579","inReplyTo":"alpine.LSU.1.00.0803082231540.3975@racer.site","subject":"Re: [PATCH] Fix dcommit, rebase when rewriteRoot is in use","fromName":"John Goerzen","fromEmail":"jgoerzen@complete.org","sentAt":"2008-03-08T22:04:18Z","receivedAt":"2008-03-08T22:04:18Z","isPatch":true,"sender":{"key":"jgoerzen@complete.org","avatar":null},"body":"On Saturday 08 March 2008 3:32:20 pm Johannes Schindelin wrote:\n> Hi,\n>\n> On Sat, 8 Mar 2008, John Goerzen wrote:\n> > Problem described here:\n> >\n> > http://thread.gmane.org/gmane.comp.version-control.git/76561\n> >\n> > Signed-off-by: John Goerzen <jgoerzen@complete.org>\n>\n> That is not a good commit message.\n>\n> Hth,\n> Dscho\n\nThanks, folks.  I have sent a new patch with a longer explanation.\n"}]}