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

alternates, git prune, git-prune(1) bug

From
BSBruce Stephens <bruce.stephens@isode.com>
Date
Aug 27, 2008, 15:18 UTC
Message-ID
<801w0abi60.fsf@tiny.isode.net>
The suggested command-line in git-prune(1) makes no sense:
EXAMPLE
       To prune objects not used by your repository nor another that
       borrows from your repository via its
       .git/objects/info/alternates:
           $ git prune $(cd ../another && $(git rev-parse --all))
It surely should have the nested $() removed:
           $ git prune $(cd ../another && git rev-parse --all)

But that doesn't really help if (as must be fairly common) the sharing repository contains objects not in the repository being pruned. In that case I just get "fatal: bad object: ..." for the first such object.

And now that "git gc" prunes, what's the recommended way to set this kind of thing up? I guess just not using alternates is the obvious one, and that would work OK for me, but for sites that want lots of sharing repositories (like git hosting sites) that wouldn't be so good. Can one set gc.pruneExpire to "never"? Ah, OK, that looks as though it'll work.

Message 1 of 1 in “alternates, git prune, git-prune(1) bug”
  1. Bruce StephensAug 27, 2008

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.