[or-cvs] [githax/master] Add a commit-message filter

Nick Mathewson nickm at seul.org
Fri Apr 24 14:19:49 UTC 2009


Author: Marcus Griep <marcus at griep.us>
Date: Fri, 24 Apr 2009 02:27:33 -0600
Subject: Add a commit-message filter

Changes "git-svn-id:$repo-uri@$rev $repo-guid" => "svn:r$rev"

Signed-off-by: Marcus Griep <marcus at griep.us>
---
 doc/svn-conversion |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/doc/svn-conversion b/doc/svn-conversion
index c62275f..e934640 100644
--- a/doc/svn-conversion
+++ b/doc/svn-conversion
@@ -42,6 +42,11 @@ vim .gitignore
 git add .gitignore
 git commit -m 'Add a gitignore file.'
 
+# Filter svn metadata to a prettier format
+git filter-branch --msg-filter '
+        sed "s/^git-svn-id:[[:space:]]*[^[:space:]]*@\([[:digit:]]\{1,\}\)[[:space:]]*.*$/svn:r\1/"
+    ' -- --all
+
 cd ..
 git clone --bare thandy_tmp thandy.git
 # Edit the configuration
-- 
1.5.6.5



More information about the tor-commits mailing list