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

Re: Adding more namespace support to git

From
Richard <richard.maw@gmail.com>
Date
Aug 22, 2016, 19:36 UTC
Message-ID
<CAB2VqoaG=8hJ8=FG5K_rS6rtMQhk2rEWowdMD2t5kk77SXfV2A@mail.gmail.com>
In-Reply-To
<20160822191622.6cok5tbbbc3ysu6f@x>
On 22 August 2016 at 20:16, Josh Triplett <josh@joshtriplett.org> wrote:
Show 12 quoted lines
> On Mon, Aug 22, 2016 at 07:36:31PM +0100, Richard wrote:
>> On 21 Aug 2016 15:07, "Josh Triplett" <josh@joshtriplett.org> wrote:
>> > I'd like to see it work more automatically than that.  Perhaps a
>> > separate environment variable to set the client-side namespace?
>>
>> How about a config option? That could be set globally, per repository, in
>> the environment or on the command line.
>
> That might work, though you wouldn't normally want to set it globally or
> per-repository (since it affects access to a repository and you'd
> typically want to use multiple different values or it wouldn't have much
> point).

Globally is a bit contrived, but could be used to keep the top-level namespace clean so you might opt to default to fetching into a namespace called "main" so that if you need to temporarily fetch into a different namespace it wouldn't be problematic. Perhaps it's a kernel tree from a vendor with a messy branch naming scheme so you don't want to fetch it into your primary namespace and make it difficult to find your branches, but you don't know which of their branches you need until you've got them all. So you fetch into the different namespace rather than a fresh clone to avoid re-fetching everything (numerous alternative solutions exist) Then once you've found out which branch you need, you make a note, switch back to the "main" namespace and re-fetch just that branch.

A per repository default namespace could also be useful if an upstream repository has multiple namespaces (code vs documentation maybe) you could fetch them all and then switch between them when you need to work on different parts, and if it's config rather than an environment variable it will persist between shell sessions easier.

Previous: Josh Triplett
Message 7 of 7 in “Adding more namespace support to git”
  1. RichardAug 20, 2016
  2. Josh TriplettAug 21, 2016
  3. RichardAug 21, 2016
  4. Josh TriplettAug 21, 2016
  5. Jeff KingAug 24, 2016
  6. Josh TriplettAug 22, 2016
  7. RichardAug 22, 2016

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.