git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Memory issue with fast-import, why track branches?

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Dec 21, 2008, 11:23 UTC
Message-ID
<94a0d4530812210323q2ae392d5o2381fd990be708e8@mail.gmail.com>
In-Reply-To
<1229847042.798.5.camel@therock.nsw.bigpond.net.au>
On Sun, Dec 21, 2008 at 10:10 AM, John Chapman <thestar@fussycoder.id.au> wrote:
> My first response was along the lines of "Why the heck are you storing
> sha1's like that!?", until I realised that you're not storing actual git
> sha1's, but mtn's hashes, which does make sense.
Yes :)
Show 7 quoted lines
> I'm doing something very similar with my perforce scripts, however I am
> doing a bit more magic instead of making so many branches.
>
> Instead of making branches, I make a tag instead, for each and every
> changeset.  Every time I make a new git commit, if I need to do it from
> a tag, I first read the tag and determine the sha1 I should use, and use
> that instead.

Well, simple tags and branches are exactly the same thing: refs. tags are in 'refs/tags' and branches in 'refs/heads'; 'refs/mtn' are not really branches.

> Alternatively, you could choose to manage your mapping yourself, and
> write them to a .git/mtg-git-map file.

The advantage of my approach is that the git tools handle all the mtn sha1's almost as good as git sha1's, I just need to prepend 'mtn/'.

Also, git name-rev finds the mtn revision of a git commit. It' all so convenient.

The only problem is that fast-import seems to be doing something wrong with those "branches".

-- 
Felipe Contreras
Previous: John ChapmanNext: Shawn O. Pearce
Message 3 of 5 in “Memory issue with fast-import, why track branches?”
  1. Felipe ContrerasDec 21, 2008
  2. John ChapmanDec 21, 2008
  3. Felipe ContrerasDec 21, 2008
  4. Shawn O. PearceDec 21, 2008
  5. Felipe ContrerasDec 22, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.