diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2010-03-23 23:22:51 +0100 |
---|---|---|
committer | Torgny Nyblom <kde@nyblom.org> | 2010-03-27 12:04:30 +0100 |
commit | 352ad0f90f7d73bec0f36410128cafde183f39ba (patch) | |
tree | e425c7ed07a49b0daa4350dbac006df7179b89bf /src | |
parent | 7ee1b3be6caa2745b723ad9364b81a5153cec1b1 (diff) | |
download | svn2git-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.cpp | 9 |
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); }; |