From: Paul Smith Date: Fri, 02 Jun 2023 20:12:35 GMT Subject: Re: Anyone know why git ls-remote output might be corrupted? Message-ID: <110083dc83b21cad7a9cb143604cd13dba097110.camel@mad-scientist.net> In-Reply-To: <000f01d9958d$347d6220$9d782660$@nexbridge.com> On Fri, 2023-06-02 at 16:02 -0400, rsbecker@nexbridge.com wrote: > > > Does your CI/CD system use sparse checkout or depth=1 or some > > > other partial clone? > > > > Yes, the local copy of the repo is a sparse checkout. > > > > I'm surprised that matters to ls-remote... I would have expected > > that the "sparseness" of the local repo is irrelevant when listing > > the state of the remote's heads? > > I'm just wondering whether this might be an impact somehow and adding > info to help the team diagnose. I have seen other commands have some > issues in the past with --depth=n I see. Well I can try changing my call to avoid the local repo in any way, and run 'git ls-remote --heads user@server:reponame' from a temporary directory outside of any repo, rather than using "origin". I would be surprised if it makes a difference but the behavior is sure strange enough that I wouldn't be THAT surprised :)