On Tue, Sep 6, 2011 at 12:41 AM, Alvaro Herrera
<alvhe...@commandprompt.com> wrote:
>> > Pity we can't use git notes.
>> Well, I guess there's no law that says we can't.  Should I give it a try?
> I don't see why not :-)  (But my guess is that you're going to need to
> publish some pull and push instructions, because I gather it's not trivial).

I spent some time looking at this this morning, and my reaction is....

To make this work, everyone who commits to the repository and everyone
who pulls from the repository must update their .git/config file.  And
if by some poor chance two people should happen to make changes to the
git notes on the same file, a horrible merge process ensues.

Here's a relevant blog entry: http://progit.org/2010/08/25/notes.html

I also discovered that when you first create a note in your local
repository, you get a new ref called notes/commits (branches and tags
are also refs).  Once you have this, it is extremely nontrivial to
figure out how to get rid of it.  Removing the note doesn't work,
because that's treated as a new commit on the ref, not a request to
undo the previous commit.  Unlike regular branches, there don't seem
to be any tools for getting rid of commits (i.e. git reset --hard
origin/master) and unlike both branches and tags, there's no
particularly obvious way to delete the ref completely (git branch { -d
| -D }, git tag -d).  I finally found a message on a mailing list with
the magic formula, which turns out to be "git update-ref -d
refs/notes/commits" (and not, as I had initially guessed, "git
update-ref -d notes/commits", which silently succeeds but fails to
accomplish anything).

As much as I'd like to have something like this, I'm inclined to think
that it will take a whole lot more time to get this facility working
than it's really worth.  Unless someone has a strong opinion the other
way, I think we should just plan to revisit this in a year or two, or
whenever the git folks have gotten around to polishing this some more.
 It feels like a potentially good feature that is still really
half-baked at this point.

Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to