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

Re: [PATCH v2] upload-pack: Fail if cloning empty namespace

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 15, 2015, 20:49 UTC
Message-ID
<xmqqh9q87l3x.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20150612223223.GA22677@leeloo.kyriasis.com>
Johannes Löthberg <johannes@kyriasis.com> writes:
Show 21 quoted lines
> On 13/06, Johannes Löthberg wrote:
>>Git should fail to clone if trying to clone from an non-existing
>>ref namespace, since it's the same as a non-existing repository
>>
>>Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
>>---
>>
>>Changes since v1:
>>
>>* Fixed the namespace check, since I apparently forgot to check with a
>>  bare repo in my last test. D'oh.
>>
>>Two other options for this would be to either add a
>>get_git_namespace_len() function and use that, or a is_namespaced()
>>functon. But since it's only used here for now at least it feels simpler
>>to not bloat the codabase with another function which has no other use.
>>
>
> I should note that I have a small test script written now, ready to be
> converted into a git test, though I want some opinions on whether the
> patch would be merged before bothering to convert it.

You would probably want new tests, but more importantly did you make sure this passes existing tests? It seems to break 5509 (there could be others) at least for me.

Previous: Johannes LöthbergNext: Johannes Löthberg
Message 5 of 11 in “upload-pack: Fail if cloning empty namespace”
  1. upload-pack: Fail if cloning empty namespaceJohannes Löthberg, Jun 12, 2015
  2. Junio C HamanoJun 12, 2015
  3. upload-pack: Fail if cloning empty namespaceJohannes Löthberg, Jun 12, 2015
  4. Johannes LöthbergJun 12, 2015
  5. Junio C HamanoJun 15, 2015
  6. Johannes LöthbergJun 20, 2015
  7. Junio C HamanoJun 20, 2015
  8. Johannes LöthbergJun 20, 2015
  9. Junio C HamanoJun 20, 2015
  10. Johannes LöthbergJun 20, 2015
  11. Junio C HamanoJun 21, 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.