git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Govind Salinas" <govind@sophiasuchtig.com>
To: "Jeff King" <peff@peff.net>
Cc: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: Re: Git Notes idea.
Date: Fri, 19 Dec 2008 11:18:17 -0600	[thread overview]
Message-ID: <5d46db230812190918qf22b874n8d8aeea557083df8@mail.gmail.com> (raw)
In-Reply-To: <20081217101110.GC18265@coredump.intra.peff.net>

On Wed, Dec 17, 2008 at 4:11 AM, Jeff King <peff@peff.net> wrote:
> On Wed, Dec 17, 2008 at 04:43:57AM +0100, Johannes Schindelin wrote:
>
>> > I agree, I haven't thought of any fix along these lines other than to
>> > make gc do the clean up.
>>
>> I have, and IIRC I briefly mentioned it back then.  Basically, you will
>> have to add a "git notes gc" or some such, which basically reads in the
>> whole notes, traverses all reachable commits, marking the corresponding
>> notes, and then writes out all marked notes (leaving the other notes
>> behind).
>
> I was thinking something similar, but I think it is even easier. Make
> the rule "if we still have the object, then we still have the note".
> That has three benefits:
>
>  - implementation is simple: for each note $n, delete it unless
>   has_sha1_file($n).
>
>  - it handles notes on non-commit objects
>
>  - it kills off notes when an object is _pruned_, not when it stops
>   being _reachable_. So if I delete a branch with a commit found
>   nowhere else, its notes will hang around until it is actually pruned.
>   If I pull it from lost+found, I still keep the notes.
>
> Note that all of this garbage collection of notes is really just
> removing them from the most current notes _tree_. If the notes structure
> is actually composed of commits, then old notes that are "deleted" will
> still be available historically.
>

This is my concern with keeping a history of the notes pseudo-branch. Let
us say that I do the following

1) on branch A commit a
2) add note a`
3) on branch B commit b
4) add note b`
5) on branch B commit c
6) add note c`
7) delete branch A
8) gc after a time such that a is pruned

Now either I will always have  anote a`

  parent reply	other threads:[~2008-12-19 17:19 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-16  8:15 Git Notes idea Govind Salinas
2008-12-16  8:51 ` Jeff King
2008-12-16  8:53   ` Jeff King
2008-12-16 18:43   ` Govind Salinas
2008-12-16 23:48     ` Johannes Schindelin
2008-12-17  9:45       ` Jeff King
     [not found]       ` <5d46db230812161815s1c48af9dwc96a4701fb2a669b@mail.gmail.com>
     [not found]         ` <alpine.DEB.1.00.0812170420560.14632@racer>
2008-12-17 10:11           ` Jeff King
2008-12-17 11:38             ` Johannes Schindelin
2008-12-17 19:20               ` Junio C Hamano
2008-12-18  3:08                 ` Johannes Schindelin
2008-12-19 17:42               ` Govind Salinas
2008-12-19 17:18             ` Govind Salinas [this message]
2008-12-19 17:38               ` Govind Salinas
2008-12-19 21:25                 ` Jeff King
2008-12-19 22:24                   ` Govind Salinas
2008-12-20  4:54                     ` Jeff King
2008-12-17 12:21       ` Petr Baudis
2008-12-17  9:38     ` Jeff King
2008-12-17 17:06       ` Govind Salinas
2008-12-18 13:54         ` Jeff King
2008-12-17  0:12   ` rebasing commits that have notes, was " Johannes Schindelin
2008-12-17  9:15     ` Johan Herland
2008-12-17 17:55       ` Stephan Beyer
2008-12-19 23:34   ` [PATCH 0/4] Notes reloaded Johannes Schindelin
2008-12-19 23:35     ` [PATCH 1/4] Introduce commit notes Johannes Schindelin
2008-12-20  6:53       ` Jeff King
2008-12-20  7:55         ` Robin Rosenberg
2008-12-20  8:05           ` Jeff King
2008-12-20  8:17             ` Junio C Hamano
2008-12-20  8:23               ` Jeff King
2008-12-20 20:09                 ` Junio C Hamano
2008-12-20 12:04         ` [PATCH v2 0/4] Notes, reloaded Johannes Schindelin
2008-12-20 12:05           ` [PATCH v2 1/4] Introduce commit notes Johannes Schindelin
2008-12-20 12:05           ` [PATCH v2 2/4] Add a script to edit/inspect notes Johannes Schindelin
2008-12-20 12:05           ` [PATCH v2 3/4] Speed up git notes lookup Johannes Schindelin
2008-12-20 12:06           ` [PATCH v2 4/4] Add an expensive test for git-notes Johannes Schindelin
2008-12-19 23:35     ` [PATCH 2/4] Add a script to edit/inspect notes Johannes Schindelin
2008-12-19 23:35     ` [PATCH 3/4] Speed up git notes lookup Johannes Schindelin
2008-12-19 23:37     ` [PATCH 4/4] Add an expensive test for git-notes Johannes Schindelin
2008-12-19 23:49       ` Boyd Stephen Smith Jr.
2008-12-20 11:51         ` Johannes Schindelin

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=5d46db230812190918qf22b874n8d8aeea557083df8@mail.gmail.com \
    --to=govind@sophiasuchtig.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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 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).