git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 2/2] t/t3308-notes-merge.sh: succeed with relaxed notes refs

From
Kyle J. McKay <mackyle@gmail.com>
Date
Jan 7, 2015, 01:51 UTC
Message-ID
<74EB0B94-0FD1-4AD2-9493-20DB02FC5071@gmail.com>
In-Reply-To
<CALKQrge3yEfmi26HMbckyw_ONRXUWtZGvz=SqqYaL2sqJaHbUg@mail.gmail.com>
On Jan 6, 2015, at 16:28, Johan Herland wrote:
Show 49 quoted lines
> On Wed, Jan 7, 2015 at 12:29 AM, Kyle J. McKay <mackyle@gmail.com>  
> wrote:
>> Perhaps that is the crux of the issue.  There is no git notes- 
>> plumbing
>> command where the git notes command continues to apply restrictions  
>> but the
>> vaporware notes-plumbing command allows anything just like update- 
>> ref does.
>
> Good observation. From my POV, as people start creating tools that use
> notes in a more structured manner (than as free-form plain-text  
> appendages
> to commit messages), the sharp and pointy bits (and bugs) of the  
> interface
> come into view. This applies to the safety features being discussed  
> in this
> thread, but also IMHO to the other things being currently discussed/ 
> fixed
> in the notes code:
> [...]
> I haven't considered that we might at some point be
> better off splitting out a separate plumbing command for manipulating
> notes. However, I'm not sure we're there, yet. The problems raised so
> far do not IMHO warrant the creation of a whole new plumbing command.
> Instead, we can still keep fixing and improving 'git notes'.
>
>> 1) There's no simple way to store remote notes refs outside the  
>> refs/notes
>> namespace in such a way that they can be used with git notes  
>> commands.
>>
>> 2) People who want to experiment with using git notes storage as a  
>> basis for
>> building some new feature are forced to store their refs under the
>> refs/notes namespace even if that does not make sense for the  
>> feature when
>> what's stored in the notes tree is not intended to provide any  
>> content that
>> is directly meaningful to the user.
>
>> A whitelist solves issue (1) but is no help for issue (2) unless some
>> additional additional part of the refs namespace were to be also
>> whitelisted.  Perhaps something like refs/x-<anything>/... in the  
>> same vein
>> as the various IETF standards for experimental names.
>
> Alternatively (or additionally), for issue (2), we could add a
> --disable-ref-safety option to 'git notes', to explicitly disable the
> safety checks for "experimental" use.

I like that. Sort of a poor-man's git notes-plumbing option. And there is precedence for this sort of thing as recently (v2.2.0) git hash-object learned a "--literally" option to bypass checks it would otherwise normally perform.

-Kyle
Previous: Johan HerlandNext: Junio C Hamano
Message 11 of 16 in “Accept any notes ref”
  1. 0/2 Accept any notes refKyle J. McKay, Jan 6, 2015
  2. 1/2 notes: accept any refKyle J. McKay, Jan 6, 2015
  3. 2/2 t/t3308-notes-merge.sh: succeed with relaxed notes refsKyle J. McKay, Jan 6, 2015
  4. Junio C HamanoJan 6, 2015
  5. Kyle J. McKayJan 6, 2015
  6. Junio C HamanoJan 6, 2015
  7. Kyle J. McKayJan 6, 2015
  8. Junio C HamanoJan 6, 2015
  9. Kyle J. McKayJan 7, 2015
  10. Johan HerlandJan 7, 2015
  11. Kyle J. McKayJan 7, 2015
  12. Junio C HamanoJan 7, 2015
  13. Johan HerlandJan 7, 2015
  14. Jeff KingJan 7, 2015
  15. Junio C HamanoJan 7, 2015
  16. Jeff KingJan 8, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.