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

Re: Deleting first commits; maintaining last commits

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Feb 21, 2025, 22:42 UTC
Message-ID
<Z7kBRYcxu3jgOTmZ@tapette.crustytoothpaste.net>
In-Reply-To
<CAJoAoZmsLu8DukvMugU6z6C=gKFP=dwDhZAT=_jE6h+dO9V55A@mail.gmail.com>
On 2025-02-21 at 16:05:59, Emily Shaffer wrote:
> For hosts which support it - which I believe includes GitHub - partial
> clone is generally easier on the server and a little bit less
> bug-prone than shallow clone.

The really expensive thing is fetching into a shallow clone. A simple shallow clone itself is not very expensive, and at $DAYJOB we encourage large-scale users (such as CI systems) to use shallow clones for that reason, since they're cheaper to serve than full clones, provided that they never fetch into them.

Now, I agree that the particular use case here is probably going to be fetching into a shallow clone, and that's okay if it's one particular user doing that occasionally, which it sounds like it is. It's definitely a problem if it's thousands of CI jobs, though.

It may be that a partial clone does perform better overall, but it has the downside that it effectively requires you to be online during usage, whereas a shallow clone does not. Whether that is a problem depends on your use case: for work, I am effectively always online, so that's not a problem, but for personal work, I want to be able to work on an airplane (where there may be no Internet and the Wi-Fi, if any, is very slow), in a hotel room with bad connectivity, or even on a retreat in the middle of nowhere without Internet at all.

So that's why I mentioned both: both options have some upsides and some downsides, and there's no one-size-fits-all solution.

-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA
Previous: Emily ShafferNext: Elijah Newren
Message 5 of 6 in “Deleting first commits; maintaining last commits”
  1. Jamenson EspindulaFeb 20, 2025
  2. brian m. carlsonFeb 21, 2025
  3. Konstantin RyabitsevFeb 21, 2025
  4. Emily ShafferFeb 21, 2025
  5. brian m. carlsonFeb 21, 2025
  6. Elijah NewrenFeb 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.