Skip to content

Commit 38a1db5

Browse files
committed
Merge commit 'refs/merge-requests/16' of git://gitorious.org/svn2git/svn2git into merge-requests/16
2 parents 13843b3 + 9edbcf8 commit 38a1db5

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/main.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,18 @@ QHash<QByteArray, QByteArray> loadIdentityMapFile(const QString &fileName)
5555
// Support git-svn author files, too
5656
// - svn2git native: loginname Joe User <user@example.com>
5757
// - git-svn: loginname = Joe User <user@example.com>
58-
int rightspace = space;
59-
if (line.indexOf(" = ") == space)
60-
rightspace += 2;
58+
int rightspace = line.indexOf(" = ");
59+
int leftspace = space;
60+
if (rightspace == -1) {
61+
rightspace = space;
62+
} else {
63+
leftspace = rightspace;
64+
rightspace += 2;
65+
}
6166

6267
QByteArray realname = line.mid(rightspace).trimmed();
63-
line.truncate(space);
68+
line.truncate(leftspace);
69+
6470
result.insert(line, realname);
6571
};
6672
file.close();

0 commit comments

Comments
 (0)