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

Re: [PATCH] Remove restriction on notes ref base

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Nov 3, 2010, 16:35 UTC
Message-ID
<20101103163524.GB12934@burratino>
In-Reply-To
<7vsjzixty5.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
Show 8 quoted lines
>> How about
>>
>>     refs/notes/*        refs/notes/$remote/*
>>
>> ?
>
> I was actually thinking more along the lines of "not keeping track of
> remote state at all".  We don't do that for tags either.

What would be the behavior when a remote and local notes ref have the same name?

Tags are supposed to be universal and never change, so that doesn't come up. With branches and notes trees, one can impose a requirement that the remote and local refs never have the same name (the "no separate remotes" layout) but I think that runs into problems from both ends:

When the remote and local notes are written by the same person, it seems like busy work to ask that person to give different names for the same branch at different installations.

In a distributed world where many developers might not even know about each other's repositories, name conflicts on development branches would seem to be inevitable.

 home> ... hack hack hack ...
 home> git notes add some-commit;	# hmm, noticed something
 home> ... hack hack hack ...
 Time to go to work...
 work> ... hack hack hack ...
 work> git notes add another-commit
 work> ... hack hack hack ...
 work> git fetch home;			# grabbing notes from home.
 work> git notes merge home/commits
 work> git push;			# publish.

Still, as long as the default can be overridden (even if only on a per-remote basis), I wouldn't mind. Maybe this way of using notes would be unusual and the no-separate-remotes layout supports some other use case better.

Previous: Jeff King
Message 21 of 21 in “Remove restriction on notes ref base”
  1. Remove restriction on notes ref baseKenny Root, Nov 2, 2010
  2. Jonathan NiederNov 2, 2010
  3. Johan HerlandNov 2, 2010
  4. Shawn PearceNov 2, 2010
  5. Jeff KingNov 2, 2010
  6. Johan HerlandNov 2, 2010
  7. Junio C HamanoNov 2, 2010
  8. Johan HerlandNov 2, 2010
  9. Chris ForbesNov 2, 2010
  10. Jonathan NiederNov 3, 2010
  11. Junio C HamanoNov 3, 2010
  12. Sverre RabbelierNov 3, 2010
  13. Johan HerlandNov 4, 2010
  14. Sverre RabbelierNov 4, 2010
  15. Tag refspecs (was Re: [PATCH] Remove restriction on notes ref base)Marc Branchaud, Nov 4, 2010
  16. Johan HerlandNov 5, 2010
  17. Marc BranchaudNov 5, 2010
  18. Jeff KingNov 4, 2010
  19. Johan HerlandNov 5, 2010
  20. Jeff KingNov 5, 2010
  21. Jonathan NiederNov 3, 2010

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.