git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Move tags to branch
@ 2010-10-04 19:16 Mathieu Malaterre
  2010-10-04 19:21 ` Jonathan Nieder
  2010-10-05  1:10 ` Jakub Narebski
  0 siblings, 2 replies; 4+ messages in thread
From: Mathieu Malaterre @ 2010-10-04 19:16 UTC (permalink / raw)
  To: git

Hi,

  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 ?

I have now:

$ git for-each-ref --format='%(refname)' refs/tags/ | xargs git log
--graph --simplify-by-decoration origin/release origin/master
| * commit 5fd43e4a662b1a7d43d2e10de3dec40c58dcb6a4
|/  Author:
|   Date:   Wed Aug 18 10:23:12 2010 +0000
|
|       ENH: Tagging the  release
|
| * commit 8d16cdc21ea84158eba57d0bc8d9ae96427fd24a
|/  Author:
|   Date:   Mon Jul 12 09:42:49 2010 +0000
|
|       obfuscate niels emails
|

I would like:

| * commit 5fd43e4a662b1a7d43d2e10de3dec40c58dcb6a4
| | Author:
| | Date:   Wed Aug 18 10:23:12 2010 +0000
| |
| |     ENH: Tagging the  release
| |
| * commit 8d16cdc21ea84158eba57d0bc8d9ae96427fd24a
| | Author:
| | Date:   Mon Jul 12 09:42:49 2010 +0000
| |
| |     obfuscate niels emails
| |

Thanks !
-- 
Mathieu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Move tags to branch
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Nieder @ 2010-10-04 19:21 UTC (permalink / raw)
  To: Mathieu Malaterre; +Cc: git

Mathieu Malaterre wrote:

> | * commit 5fd43e4a662b1a7d43d2e10de3dec40c58dcb6a4
> |/  Author:
> |   Date:   Wed Aug 18 10:23:12 2010 +0000
> |
> |       ENH: Tagging the  release
> |
> | * commit 8d16cdc21ea84158eba57d0bc8d9ae96427fd24a
> |/  Author:
> |   Date:   Mon Jul 12 09:42:49 2010 +0000
> |
> |       obfuscate niels emails
> |
> 
> I would like:
> 
> | * commit 5fd43e4a662b1a7d43d2e10de3dec40c58dcb6a4
> | | Author:
> | | Date:   Wed Aug 18 10:23:12 2010 +0000
> | |
> | |     ENH: Tagging the  release
> | |
> | * commit 8d16cdc21ea84158eba57d0bc8d9ae96427fd24a
> | | Author:
> | | Date:   Mon Jul 12 09:42:49 2010 +0000
> | |
> | |     obfuscate niels emails
> | |

How would that work?  Would Niels's emails be obfuscated on
the release branch?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Move tags to branch
  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
  1 sibling, 1 reply; 4+ messages in thread
From: Jakub Narebski @ 2010-10-05  1:10 UTC (permalink / raw)
  To: Mathieu Malaterre; +Cc: git

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?

-- 
Jakub Narebski
Poland
ShadeHawk on #git

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Move tags to branch
  2010-10-05  1:10 ` Jakub Narebski
@ 2010-10-05 17:29   ` Brad King
  0 siblings, 0 replies; 4+ messages in thread
From: Brad King @ 2010-10-05 17:29 UTC (permalink / raw)
  To: Mathieu Malaterre; +Cc: Jakub Narebski, git, Jonathan Nieder

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-05 17:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).