Re: [PATCH 1/2] git-svn: Fix the commit-url config to be the base url, just like the url config
- From
- Eric Wong <normalperson@yhbt.net>
- Date
- Apr 4, 2011, 22:54 UTC
- Message-ID
- <20110404225442.GA9307@dcvr.yhbt.net>
- In-Reply-To
- <F8E6CFA4-79F6-41AC-8266-09B3B46C8520@itasoftware.com>
James Y Knight <jknight@itasoftware.com> wrote:
Show 18 quoted lines
> On Apr 4, 2011, at 5:52 PM, Eric Wong wrote: > > $_commit_url is a user-specified parameter from the --commit-url switch. > > If they want to override it it's the user's perogative. It's not the > > default and not commonly used. > > In .git/config: > > [svn-remote "svn"] > url = http://hostname/svnrepo/ > commiturl = svn+ssh://hostname/svnrepo > branches = branches/*:refs/remotes/origin/* > fetch = trunk:refs/remotes/origin/master > > The commiturl configuration is necessary so that the canonical URL is the http:// url (which can be used for read-only access), but if you want to commit, you have to use svn+ssh. This is a fairly common way of setting up access to an svn repository, so I'm surprised to be the first one to hit this issue. > > Without the patch, you need: > commiturl = svn+ssh://hostname/svnrepo/trunk > which of course then doesn't allow you to commit to other branches.
Originally --commit-url was only intended to be a command-line option and for overriding specific cases and also for dealing with permission mismatches (limited commit access to a branch, unlimited read access to the repo).
Your patch breaks existing use cases, I think.
I think Junio's suggestion for a pushurl config which does what you think commitUrl does would be what you're after...
Thanks
-- Eric Wong