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

Re: Bug or just a mistake : --shallow-exclude parameter behavior anomalies in Git 2.45.2: "no commits selected" and "ambiguous deepen-not" errors

From
Elijah Newren <newren@gmail.com>
Date
Feb 24, 2025, 15:27 UTC
Message-ID
<CABPp-BEzjk0PLEMjtk-0jQOAag-s_iJkKMbcU+o5vv8BzRVV2A@mail.gmail.com>
In-Reply-To
<2025022016263355354612@163.com>
On Thu, Feb 20, 2025 at 12:27 AM bolide2005@163.com <bolide2005@163.com> wrote:
Show 19 quoted lines
>
> When using git clone with --shallow-exclude parameter (specifying branch name or existing commit SHA-1), two different errors occur:
>
>
>
>
> Case 1: git clone --shallow-exclude=master <repo-url>
>
>
>
> Error: fatal: no commits selected for shallow requests
>
>
>
> Case 2: git clone --shallow-exclude=ef5974fc470ad7a08f9b58dcd78724e9329910db <repo-url>
>
>
>
> Error: git upload-pack: ambiguous deepen-not: deepen-not ef5974fc470ad7a08f9b58dcd78724e9329910db

They actually should give different error messages, but the one given by the second case, in the version of Git you are using, is broken.

The error message for case 2 was fixed in 5a875ff7fbd ("upload-pack: fix ambiguous error message", 2024-11-04).

The documentation was fixed for case 2 in 00e10e07510 ("doc: correct misleading descriptions for --shallow-exclude", 2024-11-04) to point out that this usage is flawed.

Both are part of Git 2.48 and newer.
Previous: bolide2005@163.comNext: Philipp Hahn
Message 2 of 8 in “Bug or just a mistake : --shallow-exclude parameter behavior anomalies in Git 2.45.2: "no commits selected" and "ambiguous deepen-not" errors”
  1. bolide2005@163.comFeb 20, 2025
  2. Elijah NewrenFeb 24, 2025
  3. Philipp HahnSep 16, 2025
  4. D. Ben KnobleSep 16, 2025
  5. Philipp HahnSep 16, 2025
  6. Ben KnobleSep 16, 2025
  7. Elijah NewrenSep 17, 2025
  8. Erik Cervin EdinOct 21, 2025

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.