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

Re: What's cooking in git.git (Jul 2009, #01; Mon, 06)

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jul 7, 2009, 22:28 UTC
Message-ID
<20090707222820.GC11191@spearce.org>
In-Reply-To
<7vk52k9lvw.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> "Shawn O. Pearce" <spearce@spearce.org> writes:
> >> 
> >> > * jh/notes (Sat May 16 13:44:17 2009 +0200) 5 commits
> >
> > I was thinking about this the other day.  We could use a hash of
> > the commit timestamp as the top level directory.  E.g. if we take
> > the commit time of the commit and convert it to a date string,
> > we could make the note path e.g.:
> >
> >   YYYY/MM/COMMITSHA1
> 
> Is the idea to make the tree object we need to scan for that particular
> SHA-1 hash smaller?

No, the idea was to avoid needing to create a massive hash of all commit notes just to answer `git log -10` on the current branch. I remember that was a concern last time we were talking about this. By putting the notes under a timestamped path we can scan only a small percentage of the notes before we have sufficient data to output the first few commits.

> If so, I am not sure how it would help over another approach of say taking
> the first four hexdigits from the SHA-1 to use as the initial fan-out
> YYYY, then two hexdigits for the secondary fan-out MM.
See above, the idea is to avoid scanning all notes at once on
startup.  SHA-1 is bad at this as a fanout because it is too good
at uniform distribution of the names.
 
> But probably I am missing something.
> 
> Besides, trees and blobs cannot be annotated with that approach.
True.  But I didn't realize that was a goal.  :-|
-- 
Shawn.
Previous: Junio C HamanoNext: Johannes Schindelin
Message 16 of 20 in “What's cooking in git.git (Jul 2009, #01; Mon, 06)”
  1. Junio C HamanoJul 6, 2009
  2. Marcus CamenJul 6, 2009
  3. Junio C HamanoJul 6, 2009
  4. Marcus CamenJul 6, 2009
  5. Junio C HamanoJul 6, 2009
  6. Jakub NarebskiJul 6, 2009
  7. Mark LodatoJul 7, 2009
  8. Jeff KingJul 7, 2009
  9. Johannes SixtJul 7, 2009
  10. Linus TorvaldsJul 7, 2009
  11. Alex RiesenJul 7, 2009
  12. Linus TorvaldsJul 7, 2009
  13. Johannes SchindelinJul 7, 2009
  14. Shawn O. PearceJul 7, 2009
  15. Junio C HamanoJul 7, 2009
  16. Shawn O. PearceJul 7, 2009
  17. notes, was Re: What's cooking in git.git (Jul 2009, #01; Mon, 06)Johannes Schindelin, Jul 8, 2009
  18. Stephen BoydJul 8, 2009
  19. Johannes SixtJul 8, 2009
  20. Christian CouderJul 10, 2009

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.