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

Re: Anyone know why git ls-remote output might be corrupted?

From
Paul Smith <paul@mad-scientist.net>
Date
Jun 2, 2023, 20:12 UTC
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:
Show 12 quoted lines
> > > 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 :)

Previous: rsbecker@nexbridge.comNext: Elijah Newren
Message 6 of 14 in “Anyone know why git ls-remote output might be corrupted?”
  1. Paul SmithJun 2, 2023
  2. Paul SmithJun 2, 2023
  3. rsbecker@nexbridge.comJun 2, 2023
  4. Paul SmithJun 2, 2023
  5. rsbecker@nexbridge.comJun 2, 2023
  6. Paul SmithJun 2, 2023
  7. Elijah NewrenJun 3, 2023
  8. Elijah NewrenJun 3, 2023
  9. Jeff KingJun 4, 2023
  10. Jeff KingJun 4, 2023
  11. Jeff KingJun 4, 2023
  12. Paul SmithJun 9, 2023
  13. Junio C HamanoJun 9, 2023
  14. Paul SmithJun 12, 2023

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.