From 9cce68df56282882de6de36a4dc8574e7e654310 Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Wed, 21 Jul 2010 01:01:48 +0530 Subject: Move backup branches and tags to refs/branches/ The naming scheme is refs/backups/r/(heads|tags)/ Where 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. --- src/repository.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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"); -- cgit v1.2.1