git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Henrik Grubbström" <grubba@grubba.org>
To: Git Mailing list <git@vger.kernel.org>
Cc: Johan Herland <johan@herland.net>, Jonathan Nieder <jrnieder@gmail.com>
Subject: Incremental use of fast-import may cause conflicting notes
Date: Wed, 23 Nov 2011 13:09:34 +0100 (CET)	[thread overview]
Message-ID: <Pine.GSO.4.63.1111231137350.5099@shipon.roxen.com> (raw)

[-- 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

             reply	other threads:[~2011-11-23 12:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23 12:09 Henrik Grubbström [this message]
2011-11-23 12:10 ` Incremental use of fast-import may cause conflicting notes 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

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=Pine.GSO.4.63.1111231137350.5099@shipon.roxen.com \
    --to=grubba@grubba.org \
    --cc=git@vger.kernel.org \
    --cc=johan@herland.net \
    --cc=jrnieder@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).