aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/repository.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/repository.cpp b/src/repository.cpp
index f6b43e1..e9f7d2e 100644
--- a/src/repository.cpp
+++ b/src/repository.cpp
@@ -538,8 +538,6 @@ int FastImportRepository::markFrom(const QString &branchFrom, int branchRevNum,
int FastImportRepository::createBranch(const QString &branch, int revnum,
const QString &branchFrom, int branchRevNum)
{
- startFastImport();
-
QByteArray branchFromDesc = "from branch " + branchFrom.toUtf8();
int mark = markFrom(branchFrom, branchRevNum, branchFromDesc);
@@ -567,14 +565,14 @@ int FastImportRepository::createBranch(const QString &branch, int revnum,
int FastImportRepository::deleteBranch(const QString &branch, int revnum)
{
- startFastImport();
-
static QByteArray null_sha(40, '0');
return resetBranch(branch, revnum, 0, null_sha, "delete");
}
int FastImportRepository::resetBranch(const QString &branch, int revnum, int mark, const QByteArray &resetTo, const QByteArray &comment)
{
+ startFastImport();
+
QByteArray branchRef = branch.toUtf8();
if (!branchRef.startsWith("refs/"))
branchRef.prepend("refs/heads/");