diff options
author | Johan Herland <johan@herland.net> | 2009-10-09 12:22:09 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-10-19 19:00:24 -0700 |
commit | ef8db638cc96abaf166bbafe31752219f3d2cdc2 (patch) | |
tree | 4377d731875a2f2712697f39f9608dfde6f2d90b /builtin-checkout-index.c | |
parent | Add selftests verifying that we can parse notes trees with various fanouts (diff) | |
download | tgif-ef8db638cc96abaf166bbafe31752219f3d2cdc2.tar.xz |
Refactor notes code to concatenate multiple notes annotating the same object
Currently, having multiple notes referring to the same commit from various
locations in the notes tree is strongly discouraged, since only one of those
notes will be parsed and shown.
This patch teaches the notes code to _concatenate_ multiple notes that
annotate the same commit. Notes are concatenated by creating a new blob
object containing the concatenation of the notes in question, and
replacing them with the concatenated note in the internal notes tree
structure.
Getting the concatenation right requires being more proactive in unpacking
subtree entries in the internal notes tree structure, so that we don't return
a note prematurely (i.e. before having found all other notes that annotate
the same object). As such, this patch may incur a small performance penalty.
Suggested-by: Sam Vilain <sam@vilain.net>
Re-suggested-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-checkout-index.c')
0 files changed, 0 insertions, 0 deletions