aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTorgny Nyblom <nyblom@kde.org>2012-08-21 16:33:02 +0200
committerTorgny Nyblom <nyblom@kde.org>2012-08-21 16:33:02 +0200
commit38a1db5a45a5f727563fd3b26148766dce835173 (patch)
tree011ceaa80743d4465ddd7bda94f235996d923de3 /src
parent13843b3a6d521489ee58ebf9e3218e1317756e19 (diff)
parent9edbcf89ef97ae2d6886d5a6b9e30f9ff923c96d (diff)
downloadsvn2git-38a1db5a45a5f727563fd3b26148766dce835173.tar
svn2git-38a1db5a45a5f727563fd3b26148766dce835173.tar.gz
svn2git-38a1db5a45a5f727563fd3b26148766dce835173.tar.bz2
svn2git-38a1db5a45a5f727563fd3b26148766dce835173.tar.xz
svn2git-38a1db5a45a5f727563fd3b26148766dce835173.zip
Merge commit 'refs/merge-requests/16' of git://gitorious.org/svn2git/svn2git into merge-requests/16
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 60c6bb8..681824f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -55,12 +55,18 @@ QHash<QByteArray, QByteArray> loadIdentityMapFile(const QString &fileName)
// 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;
+ int rightspace = line.indexOf(" = ");
+ int leftspace = space;
+ if (rightspace == -1) {
+ rightspace = space;
+ } else {
+ leftspace = rightspace;
+ rightspace += 2;
+ }
QByteArray realname = line.mid(rightspace).trimmed();
- line.truncate(space);
+ line.truncate(leftspace);
+
result.insert(line, realname);
};
file.close();