isomorphic-git/isomorphic-git

Implement Git GC to cleanup the repo

Offen

#1.117 geöffnet am 02.05.2020

 (4 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)JavaScript (351 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (7.054 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 13T 13h) (7 gemergte PRs in 30 T)

Beschreibung

Environment: Electron + Node + isomorphic git in Node environment mode, unbundled, against standard Git repositories, that already have active branches with code in master, many of them have remotes.

When I work with a repository for a while, at some point the repository "drifts" into a state where the last commit ID/branch head becomes unresolvable, claiming some object file can't be found. The only solution to this I've found is to run git-gc, which resolves the problem.

My particular use case is to avoid working folders / indexes entirely and work with the Notes ref system, by building up a full index & file tree structure to push into the commit for that notes branch, for purposes of having an index with metadata, but then I'm not actually checking it back out, I'm primarily using readObject calls to collect all the data from the ref.

This is problematic for me, as I'm trying to avoid having to actually bundle git binaries in my app.

Contributor Guide