On Mon, Mar 6, 2023 at 8:41 AM Uwe Brauer <o...@mat.ucm.es> wrote:
> > On Sat, Mar 4, 2023 at 1:39 AM Uwe Brauer <o...@mat.ucm.es> wrote:
> > It's calculated on the fly.
> Ok, that I was afraid of.
> > Weirdly enough, I wrote a blog post [1] about a debate in 2012
> > precisely about the differences between git and mercurial, and how
> > `git name-rev` can be used to simulate mercurial branches (for the
> > most part).
> > But there are some corner cases in which git is not able to provide
> > the same information as mercurial, because it doesn't have the branch
> > point (the precise point where a branch was created). There's many
> > potential ways to calculate this branch point [2], but there isn't a
> > single infallible solution.
> > Git truly needs to be fixed in order to support this, I proposed a
> > branch@{tail} notation [3].
> That would be great, in the meantime name-rev is good enough for me in
> most cases. I have to admit that for larger repositories I still feel
> more comfortable using mercurial (one of the reasons is named branches)
> Now since quite a while the hg-git converter exports named branches to git
> branches (although that is still not officially supported)
> The problem is how to import git branches into named branches (right now
> they are converted to mercurial bookmarks).
> The problem is if name-ref is calculated by git on the fly, then one
> would need somehow first pull with the git the repository and then
> import the local repository to mercurial.

Yes, git branches are more akin to hg bookmarks, although nowadays
there's the concept of hg topics, which is even closer.

I've personally never needed some sort of per-commit label (hg
branches), but sometimes I've lacked some marker to where a git branch
was started from. I believe that's the only instance in which hg
branches might give some benefit, but the same could be achieved with

If branch@{tail} was available git name-rev would provide *exactly*
the same information as hg branches (in useful cases).


Felipe Contreras

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Reply via email to