Re: [PATCH v2 2/2] t/t3308-notes-merge.sh: succeed with relaxed notes refs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 7, 2015, 16:03 UTC
- Message-ID
- <xmqqiogilgr5.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20150107011958.GA3536@peff.net>
Jeff King <peff@peff.net> writes:
Show 15 quoted lines
> On Tue, Jan 06, 2015 at 02:20:33AM -0800, Junio C Hamano wrote: > >> The fact that "git notes merge refs/heads/master" fails is a very >> good prevention of end-user mistakes, and this removal of test >> demonstrates that we are dropping a valuable safety. > > Is it really that valuable? If it were: > > git notes merge master > > I could see somebody running that accidentally. > ... > But we are talking about > somebody who is already fully-qualifying a ref (and anything unqualified > continues to get looked up under refs/notes).
That (specifically 'merge') is not my real worry. It's the other way around, actually.
Because expand_notes_ref() makes sure that any given notes ref is prefixed appropriately to start with refs/notes/,
git notes --ref=refs/heads/master add ...blah...
git notes --ref=refs/tag/v1.0 add ...blah...would be a sensible way when somebody wants to keep a forest of notes refs, one per real ref. Wouldn't they have already been trained to spell "refs/heads/master" when they want to refer to refs/notes/refs/heads/master because of this?