[PATCH 1/2] git-svn: Fix the commit-url config to be the base url, just like the url config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: James Y Knight <jknight@xxxxxxxxxxxxxxx>

This is necessary if you want to be able to commit to multiple branches.

Signed-off-by: James Y Knight <jknight@xxxxxxxxxxxxxxx>
Signed-off-by: Alejandro R. SedeÃo <asedeno@xxxxxxx>
---
 git-svn.perl |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index a5857c1..aa41896 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -523,12 +523,14 @@ sub cmd_dcommit {
 	}
 
 	if (defined $_commit_url) {
-		$url = $_commit_url;
+		$url = $_commit_url . (length $gs->{path} ? '/' . $gs->{path} : '');
 	} else {
 		$url = eval { command_oneline('config', '--get',
 			      "svn-remote.$gs->{repo_id}.commiturl") };
 		if (!$url) {
 			$url = $gs->full_url
+		} else {
+			$url = $url . (length $gs->{path} ? '/' . $gs->{path} : '');
 		}
 	}
 
-- 
1.7.4.2.1.gd6f1f

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]