* a couple of git-svn patches
@ 2011-04-01 18:42 Alejandro R. Sedeño
2011-04-01 18:42 ` [PATCH 1/2] git-svn: Fix the commit-url config to be the base url, just like the url config Alejandro R. Sedeño
2011-04-01 18:42 ` [PATCH 2/2] git-svn: Cache results of running the executable "git config" Alejandro R. Sedeño
0 siblings, 2 replies; 3+ messages in thread
From: Alejandro R. Sedeño @ 2011-04-01 18:42 UTC (permalink / raw)
To: git, Eric Wong
Here are two independent git-svn patches that my co-worker handed off
to me back in January.
The first changes the behavior of commit_url to be like that of url so
that you can commit to multiple branches.
The second uses Memoize to cache the results of shelling out to
git-config, which has good performance benefits for git-svn fetch.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] git-svn: Fix the commit-url config to be the base url, just like the url config
2011-04-01 18:42 a couple of git-svn patches Alejandro R. Sedeño
@ 2011-04-01 18:42 ` Alejandro R. Sedeño
2011-04-01 18:42 ` [PATCH 2/2] git-svn: Cache results of running the executable "git config" Alejandro R. Sedeño
1 sibling, 0 replies; 3+ messages in thread
From: Alejandro R. Sedeño @ 2011-04-01 18:42 UTC (permalink / raw)
To: git, Eric Wong; +Cc: James Knight, Alejandro R. Sedeño
From: James Knight <jknight@itasoftware.com>
This is necessary if you want to be able to commit to multiple branches.
Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] git-svn: Cache results of running the executable "git config"
2011-04-01 18:42 a couple of git-svn patches Alejandro R. Sedeño
2011-04-01 18:42 ` [PATCH 1/2] git-svn: Fix the commit-url config to be the base url, just like the url config Alejandro R. Sedeño
@ 2011-04-01 18:42 ` Alejandro R. Sedeño
1 sibling, 0 replies; 3+ messages in thread
From: Alejandro R. Sedeño @ 2011-04-01 18:42 UTC (permalink / raw)
To: git, Eric Wong; +Cc: James Y Knight, Alejandro R. Sedeño
From: James Y Knight <jknight@itasoftware.com>
Running programs is not cheap!
Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
---
git-svn.perl | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index aa41896..e47e04c 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -59,6 +59,7 @@ use File::Find;
use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;
use IPC::Open3;
use Git;
+use Memoize; # core since 5.8.0, Jul 2002
BEGIN {
# import functions from Git into our packages, en masse
@@ -72,6 +73,8 @@ BEGIN {
*{"${package}::$_"} = \&{"Git::$_"};
}
}
+ Memoize::memoize 'Git::config';
+ Memoize::memoize 'Git::config_bool';
}
my ($SVN);
@@ -3199,6 +3202,8 @@ sub has_no_changes {
Memoize::unmemoize 'check_cherry_pick';
Memoize::unmemoize 'has_no_changes';
}
+
+ Memoize::memoize 'Git::SVN::repos_root';
}
END {
--
1.7.4.2.1.gd6f1f
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-01 18:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-01 18:42 a couple of git-svn patches Alejandro R. Sedeño
2011-04-01 18:42 ` [PATCH 1/2] git-svn: Fix the commit-url config to be the base url, just like the url config Alejandro R. Sedeño
2011-04-01 18:42 ` [PATCH 2/2] git-svn: Cache results of running the executable "git config" Alejandro R. Sedeño
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).