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

Re: git branch --edit-description a custom file

From
Jeff King <peff@peff.net>
Date
Oct 31, 2019, 20:07 UTC
Message-ID
<20191031200739.GA19313@sigill.intra.peff.net>
In-Reply-To
<4ef79cfb-b970-2b2b-131d-3f47e6b0e308@gmail.com>
On Thu, Oct 31, 2019 at 07:53:18PM +0000, Phillip Wood wrote:
Show 11 quoted lines
> > So how would you envision the workflow for this? Would it be something
> > like,
> > 
> > 	$ git checkout feature-1
> > 
> > 	$ git branch --edit-description=ref # instead of =config
> 
> Personally I'd prefer a config setting that meant --edit-description stored
> the description in a ref instead of the current config key (or perhaps as
> well as so format-patch can just get the latest branch description from the
> config key)

Yes, a config option makes much more sense to me. Both the writers and readers will need to know where to find the data.

Show 10 quoted lines
> > * Since we're planning on sharing these descriptions with the outside
> >    world, how would the ref layout look like? If we're not using the
> >    refs/remotes namespace will it make fetching and merging notes harder?
> >    I know that collaborating with notes is a pain so how do we avoid
> >    making the same mistake?
> 
> I'd love to see a consensus around putting remote versions of refs/foo under
> refs/remote/<remote-name>/foo. To share notes I add a refspec that fetches
> to refs/remote/<remote-name>/notes. It is a pain that 'git pull' wont merge
> them for me though.

The trouble with that sort of scheme is that it conflicts with the current namespace scheme, which puts the remote "notes" branch in "refs/remotes/<remote-name>/notes". And it's not just a problem if you want to have a branch called "notes". Think about what "git fetch --prune" would do.

I do think the world would be a better place if we mapped (all or a subset of) the remote "refs/" into "refs/remotes/<remote-name>/". I.e., really creating "refs/remotes/origin/heads" and even "refs/remotes/origin/tags". But we'd need to re-adjust the way that some ref lookups work (e.g., looking in refs/remotes/*/tags for tags).

There was some work by Johan Herland around the v1.8 time-frame, but it stalled:

  https://public-inbox.org/git/AANLkTi=yFwOAQMHhvLsB1_xmYOE9HHP2YB4H4TQzwwc8@mail.gmail.com/
And here's some later discussion:
  https://public-inbox.org/git/CA+P7+xpj+8DZ=K0pna299Mu3nsQ4+JV_JUK=WFzzAFnJN+Bkbg@mail.gmail.com/

So in short, I agree very much with the direction you're discussing, but I think there's some fundamental work that needs done first.

-Peff
Previous: Phillip WoodNext: Phillip Wood
Message 15 of 21 in “git branch --edit-description a custom file”
  1. Denton LiuOct 30, 2019
  2. Jeff KingOct 30, 2019
  3. Denton LiuOct 30, 2019
  4. Jeff KingOct 31, 2019
  5. Johannes SchindelinOct 31, 2019
  6. Phillip WoodOct 31, 2019
  7. Johannes SchindelinOct 31, 2019
  8. Philip OakleyOct 31, 2019
  9. Jeff KingOct 31, 2019
  10. Philip OakleyNov 3, 2019
  11. Jeff KingNov 4, 2019
  12. Junio C HamanoNov 4, 2019
  13. Denton LiuOct 31, 2019
  14. Phillip WoodOct 31, 2019
  15. Jeff KingOct 31, 2019
  16. Phillip WoodNov 1, 2019
  17. Jeff KingNov 1, 2019
  18. Phillip WoodNov 1, 2019
  19. Junio C HamanoNov 2, 2019
  20. Denton LiuOct 31, 2019
  21. Jeff KingOct 31, 2019

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.