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, 21:52 UTC
- Message-ID
- <20110404215227.GA4224@dcvr.yhbt.net>
- In-Reply-To
- <1301944148-7950-2-git-send-email-asedeno@mit.edu>
"Alejandro R. Sedeño" <asedeno@mit.edu> wrote:
> From: James Y Knight <jknight@itasoftware.com> > > This is necessary if you want to be able to commit to multiple branches.
I'm not sure I understand the need for this patch, see below.
Show 6 quoted lines
> @@ -523,12 +523,14 @@ sub cmd_dcommit {
> }
>
> if (defined $_commit_url) {
> - $url = $_commit_url;
> + $url = $_commit_url . (length $gs->{path} ? '/' . $gs->{path} : '');$_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.
Show 5 quoted lines
> } else {
> $url = eval { command_oneline('config', '--get',
> "svn-remote.$gs->{repo_id}.commiturl") };
> if (!$url) {
> $url = $gs->full_urlIf unspecified, we always fall back to the gs->full_url case anyways which just duplicates the logic you've added. Again, commitUrl usually does not need to be specified since it is autodetected.
> + } else {
> + $url = $url . (length $gs->{path} ? '/' . $gs->{path} : '');
> }
> }-- Eric Wong