'helm plugin update' ran the dirty check and pull against the installed
plugin directory itself: updatePlugin resolves p.Dir() and FindSource
builds the VCS repo on that path, which Install() made a git checkout by
copying .git from the cached clone. A plugin whose install hook rewrites
files inside its own directory (as helm-unittest's install-binary.sh
does) leaves that checkout permanently dirty, so every subsequent update
fails with "plugin repo was modified".
Point existingVCSRepo at Helm's cached clone of the plugin repository
instead. Hooks only ever run against the installed copy, so the cache
stays pristine: Update() now syncs the cache (recloning it if it was
evicted) and refreshes the installed copy from that clean checkout,
mirroring Install() and OCIInstaller.Update(). The dirty guard is kept
for the cache itself, where it means what it says again.
Closes#31664
Signed-off-by: Bisman-Singh <bismanmadaan1@gmail.com>