News for hackers. Stuff that matters.
Re:Git clone –depth 2 is vastly better than –depth 1 if you ... by rafaelcosta on Wednesday February 12, 2025 @04:32AM (#43023548)
I'm wondering what the "because when we read it in, we mangle it" part really means... does this mean that there's no way to reference the commit (signaling that it's just a reference and has no actual data) without actually reading the contents of it?

-- Update: just realized why it wouldn't make sense: `git push` would send only the delta from the previous commit and the previous commit is... non-existent (we only know it's ID), so we'd be back in square 1 (sending everything).

Re:Git clone –depth 2 is vastly better than –depth 1 if you ... by kruador on Wednesday February 12, 2025 @08:05AM (#43025013)
See my top-level response, but basically nothing is mangled. Instead Git internally treats it as a 'graft' and knows not to look for parents of the prior commit.

I started that comment as a reply to you but I realised that a) it may just have been a bug that might already be fixed and b) it looks like the Stack Overflow answer was speculative and not tested!