aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@hurrynot.org>2010-07-21 01:01:48 +0530
committerRaja R Harinath <harinath@hurrynot.org>2010-07-21 01:39:37 +0530
commit9cce68df56282882de6de36a4dc8574e7e654310 (patch)
treef1fac1edda599803b5a6947b0cd21b21ab36d32b
parenta159decede356e9d72a74ea38d31ed251ce408e9 (diff)
downloadsvn2git-9cce68df56282882de6de36a4dc8574e7e654310.tar
svn2git-9cce68df56282882de6de36a4dc8574e7e654310.tar.gz
svn2git-9cce68df56282882de6de36a4dc8574e7e654310.tar.bz2
svn2git-9cce68df56282882de6de36a4dc8574e7e654310.tar.xz
svn2git-9cce68df56282882de6de36a4dc8574e7e654310.zip
Move backup branches and tags to refs/branches/
The naming scheme is refs/backups/r<svn-revision>/(heads|tags)/<branch> Where <svn-revision> is the revision where the branch is being reset: either for deletion or to be overwritten. We use a separate namespace so that we don't clutter up branch-name lists and tag lists with deleted tags. These refs will keep the commits alive as far as 'git gc' is concerned, but will be fairly unobstrusive otherwise.
-rw-r--r--src/repository.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/repository.cpp b/src/repository.cpp
index 48358e7..a53d206 100644
--- a/src/repository.cpp
+++ b/src/repository.cpp
@@ -342,7 +342,7 @@ int Repository::resetBranch(const QString &branch, int revnum, int mark, const Q
Branch &br = branches[branch];
if (br.created && br.created != revnum && br.marks.last()) {
- QByteArray backupBranch = branchRef + '_' + QByteArray::number(revnum);
+ QByteArray backupBranch = "refs/backups/r" + QByteArray::number(revnum) + branchRef.mid(4);
qWarning() << "backing up branch" << branch << "to" << backupBranch;
fastImport.write("reset " + backupBranch + "\nfrom " + branchRef + "\n\n");