On Thu, Feb 20, 2025 at 12:27 AM bolide2005@xxxxxxx <bolide2005@xxxxxxx> wrote: > > 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.