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

Re: [PATCH] git-fast-import: note 1M limit of mark number

From
Shawn O. Pearce <spearce@spearce.org>
Date
Apr 16, 2008, 06:54 UTC
Message-ID
<20080416065425.GC29771@spearce.org>
In-Reply-To
<48051882.8000201@vilain.net>
Sam Vilain <sam@vilain.net> wrote:
Show 19 quoted lines
> Michael Haggerty wrote:
> >> ++
> >> +Note that due to current internal limitations, you may not make marks
> >> +with a higher number than 1048575 (2^20-1).
> >>  
> >>  * A complete 40 byte or abbreviated commit SHA-1 in hex.
> > 
> > Oh.  Um.  That is an awkwardly small number nowadays.
> > 
> > cvs2svn has been used for repositories with O(2^20) distinct file
> > revisions (KDE, Mozilla, NetBSD, ...).  So this limit will likely be too
> > small for some users.
> 
> Right.  But, if you're not making the importer you write for a
> conversion of that size restartable, you're insane.  So, marking more
> than 1Mi *marks* in a single gfi session might not be so vital.
> 
> It only tripped me up because I was using a database sequence to
> generate the marks, which meant I hit the ceiling.

Uhm. Wow. gfi has a bug then; mark numbers are supposed to be whatever uintmax_t is on your platform; for any systems that support a 64 bit off_t (and most do these days) that should be a 64 bit integer value, which we all know easily exceeds 2^20-1.

I'd rather see the bug fixed than a documentation patch.  But I'm
too whacked out from heavy travel in the past two days flying
coast-to-coast and back to attempt debugging gfi and writing such
a fix patch tonight.  Maybe someone else will find it before I
can look at it later.  ;-)
 
Show 8 quoted lines
> > While I'm at it, let me also renew my suggestion that git-fast-import
> > use separate namespaces ("markspaces", so to speak) for file content
> > marks and for commit marks.  There is no reason for these distinct types
> > of marks to be located in a shared space of integers.
> 
> There is a reason, it's because they're both just object IDs.  Is it
> really that much of a drag?  I know what you mean though, it meant for
> my code I had to keep track of which type each mark was.

Yea. I think I had pointed out the same point to Michael earlier when he asked about it. I didn't want create two different tables of marks because then we either need to extend the language to say which table, or we have to infer it based on position. But either way its just object IDs.

-- 
Shawn.
Previous: Sam VilainNext: Michael Haggerty
Message 4 of 5 in “git-fast-import: note 1M limit of mark number”
  1. git-fast-import: note 1M limit of mark numberSam Vilain, Apr 15, 2008
  2. Michael HaggertyApr 15, 2008
  3. Sam VilainApr 15, 2008
  4. Shawn O. PearceApr 16, 2008
  5. Michael HaggertyApr 16, 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.