From: Junio C Hamano <gitster@pobox.com>
To: Johan Herland <johan@herland.net>
Cc: Scott Chacon <schacon@gmail.com>, Jeff King <peff@peff.net>,
Git mailing list <git@vger.kernel.org>
Subject: Re: [PATCH] notes: accept any ref for merge
Date: Fri, 19 Sep 2014 11:22:58 -0700 [thread overview]
Message-ID: <xmqqoaubmpvh.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CALKQrgc4nZdaXM-Ooh1pP4x4nZRLexJzLyaBmrgn+qVaQGCg+g@mail.gmail.com> (Johan Herland's message of "Fri, 19 Sep 2014 16:01:38 +0200")
Johan Herland <johan@herland.net> writes:
> On Fri, Sep 19, 2014 at 11:39 AM, Jeff King <peff@peff.net> wrote:
>> On Fri, Sep 19, 2014 at 09:39:45AM +0200, Scott Chacon wrote:
>>> Currently if you try to merge notes, the notes code ensures that the
>>> reference is under the 'refs/notes' namespace. In order to do any sort
>>> of collaborative workflow, this doesn't work well as you can't easily
>>> have local notes refs seperate from remote notes refs.
>>>
>>> This patch changes the expand_notes_ref function to check for simply a
>>> leading refs/ instead of refs/notes to check if we're being passed an
>>> expanded notes reference. This would allow us to set up
>>> refs/remotes-notes or otherwise keep mergeable notes references outside
>>> of what would be contained in the notes push refspec.
>>
>> I think this change affects not just "git notes merge", but all of the
>> notes lookups (including just "git notes show")....
> ...
> Additionally, I suggest adding another test demonstrating your use
> case as well. Something like setting up a small scenario for notes
> collaboration, and walking through the various steps:
>
> - Creating a couple of repos where notes are added/edited
> - Setting up config to allow pushing and/or fetching notes
> - Performing the push/fetch
> - Merging with the corresponding local notes ref
Is it our future direction to set up refs/remote-notes/<remote>/
namespace? If so, let's not do it piecemeail in an unorganized
guerrilla fashion by starting with a stealth enabler with an
associated test. We risk not following through and leave the
resulting user experience more puzzling if we go that way.
By "stealth enabler" I mean the removal of refs/notes/ restriction
that was originally done as a safety measure to avoid mistakes of
storing notes outside. The refs/remote-notes/ future direction
declares that it is no longer a mistake to store notes outside
refs/notes/, but that does not necessarily have to mean that
anywhere under refs/ is fine. It may make more sense to be explicit
with the code touched here to allow traditional refs/notes/ and the
new hierarchy only. That way, we will still keep the "avoid
mistakes" safety and enable the new layout at the same time.
The most important first step for that to happen is to make sure we
are on the same page on that future direction. I personally think
refs/remote-notes/<remote> that runs parallel to the remote tracking
branch hierarchy refs/remotes/<remote> is a reasonable way to do
this, but my words are no way final.
Assuming that this is we all agree to go in that direction, let's
make a list of things to be done to codify it, and do them. For a
starter, I think these are needed, perhaps?
- This patch (or an enhancement to keep some safety)
- Documentation updates to "git notes"
- Documentation updates to Documentation/gitrepository-layout.txt
- Update to "git clone" and "git remote add" to add a fetch refspec
refs/notes:refs/remote-refs/<remote>/*
- New tests you suggest
next prev parent reply other threads:[~2014-09-19 18:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-19 7:39 [PATCH] notes: accept any ref for merge Scott Chacon
2014-09-19 9:39 ` Jeff King
2014-09-19 14:01 ` Johan Herland
2014-09-19 18:22 ` Junio C Hamano [this message]
2014-09-20 0:01 ` Johan Herland
2014-09-22 17:34 ` Junio C Hamano
2014-11-22 18:04 ` Kyle J. McKay
2014-12-04 10:26 ` Jeff King
2014-09-19 17:29 ` Junio C Hamano
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=xmqqoaubmpvh.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=johan@herland.net \
--cc=peff@peff.net \
--cc=schacon@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.