git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Incremental use of fast-import may cause conflicting notes
@ 2011-11-23 12:09 Henrik Grubbström
  2011-11-23 12:10 ` Henrik Grubbström
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Henrik Grubbström @ 2011-11-23 12:09 UTC (permalink / raw)
  To: Git Mailing list; +Cc: Johan Herland, Jonathan Nieder

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1318 bytes --]

Hi.

Background: I have an incremental repository-walker creating a 
corresponding documentation repository from a source repository
that uses git-notes to store its state, a use for which notes
seem very suitable.

Problem: When the number of notes in the root of the notes branch
increases beyond a threshold, fast-import changes the fanout. This 
is as designed, but the problem is that when fast-import is restarted
it won't remember the fanout, and will start writing files in the root 
again. This means that there may be multiple notes-files for the same 
commit, eg both de/adbeef and deadbeef.

This is not what the user expects, and is not good practice, even if it in 
this case actually works, since the latter is defined to have priority.
I'm however not sure if eg fast_import.c:do_change_note_fanout() will do 
the right thing if/when the fanout is changed again.

The problem is probably due to b->num_notes not being initialized properly 
when the old non-empty root commit for the notes branch is loaded in 
parse_from()/parse_new_commit().

My workaround for now is to use filedeleteall and restore all the notes
by hand in the first new commit on the notes branch.

Version of git: 1.7.6.4 (gentoo)

Thanks,

--
Henrik Grubbström					grubba@grubba.org
Roxen Internet Software AB				grubba@roxen.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-11-25  1:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23 12:09 Incremental use of fast-import may cause conflicting notes Henrik Grubbström
2011-11-23 12:10 ` Henrik Grubbström
2011-11-24 23:09 ` Jonathan Nieder
2011-11-25  0:09 ` [RFC/PATCH 0/3] fast-import: Fix incremental use of notes Johan Herland
2011-11-25  0:09   ` [RFC/PATCH 1/3] t9301: Fix testcase covering up a bug in fast-import's notes fanout handling Johan Herland
2011-11-25  0:09   ` [RFC/PATCH 2/3] t9301: Add 2nd testcase exposing bugs " Johan Herland
2011-11-25  0:09   ` [RFC/PATCH 3/3] fast-import: Fix incorrect fanout level when modifying existing notes refs Johan Herland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).