Re: git-svn tags and branches

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: git-svn tags and branches

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:31

"Giuseppe Bilotta" [off-list ref] writes:
BTW can git have a tag and a branch with the same name? If
not,...
This is "Yes but".

You can have a tag foo and branch foo.

- "git checkout foo" would switch you to foo branch

- Anything else that lets you use an abbreviated refname 'foo',
  e.g.

  . git branch newbranch foo
  . git log foo
  . git diff foo

  will scold you that 'foo' is ambiguous, while it does not
  outright fail, and takes the first match from the list defined
  in sha1_name.c (ref_fmt[]), so a tag wins over a branch.  You
  can clarify yourself to avoid ambiguity like so:

  . git branch newbranch heads/foo ;# I mean "branch from foo branch"
  . git log tags/foo ;# "show history starting at that tag"

Re: git-svn tags and branches

From: Giuseppe Bilotta <hidden>
Date: 2016-06-15 22:43:31

On 8/29/07, Junio C Hamano [off-list ref] wrote:
"Giuseppe Bilotta" [off-list ref] writes:
quoted
BTW can git have a tag and a branch with the same name? If
not,...
This is "Yes but".

You can have a tag foo and branch foo.
[snip]
 You can clarify yourself to avoid ambiguity like so:

  . git branch newbranch heads/foo ;# I mean "branch from foo branch"
  . git log tags/foo ;# "show history starting at that tag"
Ok. So assuming we import a svn repo which has a tag and a branch
called 'name', and that there are post-tag commits in tags/name, how
do we call the stuff?

We could call 'name' both the (annotated) tag and the branch, but what
name would we use for the branch created by post-tag commits?


-- 
Giuseppe "Oblomov" Bilotta
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help