aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2010-03-23 23:22:51 +0100
committerTorgny Nyblom <kde@nyblom.org>2010-03-27 12:04:30 +0100
commit352ad0f90f7d73bec0f36410128cafde183f39ba (patch)
treee425c7ed07a49b0daa4350dbac006df7179b89bf /src
parent7ee1b3be6caa2745b723ad9364b81a5153cec1b1 (diff)
downloadsvn2git-352ad0f90f7d73bec0f36410128cafde183f39ba.tar
svn2git-352ad0f90f7d73bec0f36410128cafde183f39ba.tar.gz
svn2git-352ad0f90f7d73bec0f36410128cafde183f39ba.tar.bz2
svn2git-352ad0f90f7d73bec0f36410128cafde183f39ba.tar.xz
svn2git-352ad0f90f7d73bec0f36410128cafde183f39ba.zip
Add support for git-svn author files
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 2e92a32..a00c6dc 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -46,7 +46,14 @@ QHash<QByteArray, QByteArray> loadIdentityMapFile(const QString &fileName)
if (space == -1)
continue; // invalid line
- QByteArray realname = line.mid(space).trimmed();
+ // Support git-svn author files, too
+ // - svn2git native: loginname Joe User <user@example.com>
+ // - git-svn: loginname = Joe User <user@example.com>
+ int rightspace = space;
+ if (line.indexOf(" = ") == space)
+ rightspace += 2;
+
+ QByteArray realname = line.mid(rightspace).trimmed();
line.truncate(space);
result.insert(line, realname);
};