From: Henrik Grubbström Date: Wed, 23 Nov 2011 12:10:57 GMT Subject: Re: Incremental use of fast-import may cause conflicting notes Message-ID: In-Reply-To: On Wed, 23 Nov 2011, Henrik Grubbström wrote: > 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) Oops, wrong machine... 1.7.8.rc3 (gentoo) > Thanks, -- Henrik Grubbström grubba@roxen.com Roxen Internet Software AB