All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johan Herland <johan@herland.net>
Cc: git@vger.kernel.org, Johannes.Schindelin@gmx.de,
	trast@student.ethz.ch, tavestbo@trolltech.com,
	git@drmicha.warpmail.net, chriscool@tuxfamily.org,
	spearce@spearce.org
Subject: Re: [PATCHv4 08/12] Teach the notes lookup code to parse notes trees with various fanout schemes
Date: Wed, 26 Aug 2009 22:00:56 -0700	[thread overview]
Message-ID: <7v7hwp6ebb.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 1251337437-16947-9-git-send-email-johan@herland.net

Johan Herland <johan@herland.net> writes:

> The semantics used when parsing notes trees (with regards to fanout subtrees)
> follow Dscho's proposal fairly closely:
> - No concatenation/merging of notes is performed. If there are several notes
>   objects referencing a given commit, only one of those objects are used.
> - If a notes object for a given commit is present in the "root" notes tree,
>   no subtrees are consulted; the object in the root tree is used directly.
> - If there are more than one subtree that prefix-matches the given commit,
>   only the subtree with the longest matching prefix is consulted. This
>   means that if the given commit is e.g. "deadbeef", and the notes tree have
>   subtrees "de" and "dead", then the following paths in the notes tree are
>   searched: "deadbeef", "dead/beef". Note that "de/adbeef" is NOT searched.
> - Fanout directories (subtrees) must references a whole number of bytes
>   from the SHA1 sum they subdivide. E.g. subtrees "dead" and "de" are
>   acceptable; "d" and "dea" are not.
> - Multiple levels of fanout are allowed. All the above rules apply
>   recursively. E.g. "de/adbeef" is preferred over "de/adbe/ef", etc.

If I am reading this correctly, the earlier parts of the series were
aiming to let multiple people to add notes to the same commit more or less
uncordinated while still allowing to merge them sensibly, but now such a
workflow becomes impossible with this change.  

The above claims notes trees with different levels of fan-out are allowed,
but what it really means is that merging notes trees with different levels
of fan-out will produce a useless result that records notes for the same
commit in different blobs all over the notes tree, and asking the notes
mechanism to give the notes for one commit will give only one piece that
originates in the tree whose creator happened to have used the longest
prefix while ignoring all others.  It may _allow_ such a layout, but how
would such semantics be useful in the first place?

I suspect that I am missing something but my gut feeling is that this
change turns an interesting hack (even though it might be expensive) into
a hack that is not useful at all in the real world, without some order,
discipline, or guideline is applied.

What's the recommended way to work with this system from the end user's
point of view in a distirbuted environment?  Somebody up in the project is
supposed to decide what fan-out is to be used for the whole project and
everybody should follow that structure?  If a participant in the project
forgets that rule (or makes a mistake), a notes tree that mistakenly
merges his notes tree becomes practically useless?  If so, perhaps we
would need a mechanism to avoid such a mistake from happening?

  reply	other threads:[~2009-08-27  5:01 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-27  1:43 [PATCHv4 00/12] git notes Johan Herland
2009-08-27  1:43 ` [PATCHv4 01/12] Introduce commit notes Johan Herland
2009-08-27  1:43 ` [PATCHv4 02/12] Add a script to edit/inspect notes Johan Herland
2009-08-27  1:43 ` [PATCHv4 03/12] Speed up git notes lookup Johan Herland
2009-08-27  1:43 ` [PATCHv4 04/12] Add an expensive test for git-notes Johan Herland
2009-08-27  1:43 ` [PATCHv4 05/12] Teach "-m <msg>" and "-F <file>" to "git notes edit" Johan Herland
2009-08-27  1:43 ` [PATCHv4 06/12] fast-import: Add support for importing commit notes Johan Herland
2009-08-27  1:43 ` [PATCHv4 07/12] t3302-notes-index-expensive: Speed up create_repo() Johan Herland
2009-08-27  1:43 ` [PATCHv4 08/12] Teach the notes lookup code to parse notes trees with various fanout schemes Johan Herland
2009-08-27  5:00   ` Junio C Hamano [this message]
2009-08-27  9:35     ` Johan Herland
2009-08-27 10:47       ` Johannes Schindelin
2009-08-27 20:58         ` Junio C Hamano
2009-08-28  8:48           ` Johannes Schindelin
2009-08-27 20:55       ` Junio C Hamano
2009-08-27 21:27         ` Shawn O. Pearce
2009-08-27 21:50           ` Junio C Hamano
2009-08-27 23:03             ` Johan Herland
2009-08-27 23:39               ` Jeff King
2009-08-28  0:30                 ` Junio C Hamano
2009-08-28  0:40                   ` Sverre Rabbelier
2009-08-28  1:43                     ` Junio C Hamano
2009-08-28  2:51                       ` Sverre Rabbelier
2009-08-28  3:02                         ` Junio C Hamano
2009-08-28  3:05                           ` Sverre Rabbelier
2009-08-28  3:35                             ` Junio C Hamano
2009-08-28  8:51               ` Johannes Schindelin
2009-08-28 10:40                 ` Johan Herland
2009-08-28 11:56                   ` Johannes Schindelin
2009-08-28 14:15                     ` Johan Herland
2009-08-27 10:42     ` Johannes Schindelin
2009-08-27  1:43 ` [PATCHv4 09/12] Selftests verifying semantics when loading notes trees with various fanouts Johan Herland
2009-08-27  1:43 ` [PATCHv4 10/12] notes.c: Implement simple memory pooling of leaf nodes Johan Herland
2009-08-27  7:39   ` Alex Riesen
2009-08-27  9:49     ` Johan Herland
2009-08-27 22:43       ` Johan Herland
2009-08-27  1:43 ` [PATCHv4 11/12] Add flags to get_commit_notes() to control the format of the note string Johan Herland
2009-08-27  1:43 ` [PATCHv4 12/12] Add '%N'-format for pretty-printing commit notes Johan Herland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v7hwp6ebb.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=chriscool@tuxfamily.org \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=johan@herland.net \
    --cc=spearce@spearce.org \
    --cc=tavestbo@trolltech.com \
    --cc=trast@student.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.