From: Brad King <brad.king@kitware.com>
To: Mathieu Malaterre <mathieu.malaterre@gmail.com>
Cc: Jakub Narebski <jnareb@gmail.com>,
git@vger.kernel.org, Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: Move tags to branch
Date: Tue, 05 Oct 2010 13:29:22 -0400 [thread overview]
Message-ID: <4CAB6072.2060407@kitware.com> (raw)
In-Reply-To: <m3mxqtfnrk.fsf@localhost.localdomain>
On 10/04/2010 09:10 PM, Jakub Narebski wrote:
> Mathieu Malaterre <mathieu.malaterre@gmail.com> writes:
>
>> I have been using svn2git to start using git. However svn2git
>> creates tags from HEAD instead of the branch. Is there a way to move
>> tags back to the branch ?
>
> Isn't it by a chance caused by the fact that Subversion does not
> "enforce" tags to not change?
I've converted repositories with this problem before. Subversion
"tags" are basically branches. I usually manufacture a merge commit
to keep the tagged versions alive in history as close to inline as
possible. For example, if the conversion result is
o----v2
/
...o----B----o----o----C----D master
\
o----v1
because "tags" v1 and v2 have had a couple of commits, I manually
convert it to
o----v2
/ \
...o----B--B'--o----o----C---C'---D master
\ /
o----v1
using git plumbing, grafts, and filter-branch.
B' has B as its first parent, v1 as its second parent, and the same
tree object as B. Similarly for C', C, and v2. The commit messages
for B' and C' explain that they were manufactured retroactively during
conversion.
Commits B and C were selected as the artificial "merge points" by
finding the newest commits in a first-parent traversal of master that
were not newer than v1 and v2, respectively. The committer times for
B' and C' are taken from v1 and v2 (or a time shortly thereafter).
-Brad
prev parent reply other threads:[~2010-10-05 17:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 19:16 Move tags to branch Mathieu Malaterre
2010-10-04 19:21 ` Jonathan Nieder
2010-10-05 1:10 ` Jakub Narebski
2010-10-05 17:29 ` Brad King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CAB6072.2060407@kitware.com \
--to=brad.king@kitware.com \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=jrnieder@gmail.com \
--cc=mathieu.malaterre@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).