Claude Code checks a plugin marketplace's remote git ref before re-cloning it, skipping the clone when nothing changed
Before refreshing a plugin marketplace's local git checkout, Claude Code now runs git ls-remote (a command that lists what commits a remote git repository currently has) against the configured ref, or HEAD, and compares the result to the commit the local checkout already has. It only re-clones when the sparse checkout paths changed, HEAD can't be read, the ref isn't advertised by the remote, or the commit hashes differ. Otherwise it reports the checkout as already current.
This avoids unnecessary re-cloning of a marketplace repository when nothing has actually changed, saving time and network calls when Claude Code checks whether plugin marketplaces are up to date.