From: Phillip Wood Date: Fri, 01 Nov 2019 12:29:43 GMT Subject: Re: git branch --edit-description a custom file Message-ID: <822d51af-d522-bf2c-72de-f54a4ccb3b38@gmail.com> In-Reply-To: <20191031200739.GA19313@sigill.intra.peff.net> Hi Peff On 31/10/2019 20:07, Jeff King wrote: > On Thu, Oct 31, 2019 at 07:53:18PM +0000, Phillip Wood wrote: > [...] >> >> I'd love to see a consensus around putting remote versions of refs/foo under >> refs/remote//foo. To share notes I add a refspec that fetches >> to refs/remote//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//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 was suggesting a convention of using refs/remote/ not refs/remotes/ for tracking remote refs that are not branches to avoid that problem. It's not ideal to have remote branches under a different namespace to all the other remote refs but it does avoid breaking current setups. I haven't thought it through but perhaps in the long run we could migrate remote branches to refs/remote//heads/ and treat refs/remotes// as an alias for refs/remote//heads/. As you say below we'd need to think about how to use remote tags as well. > I do think the world would be a better place if we mapped (all or a > subset of) the remote "refs/" into "refs/remotes//". 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. Thanks for the links, I'll have a read through them. Best Wishes Phillip > -Peff >