Closed j-lanson closed 1 month ago
@j-lanson can you squash down to one commit?
In the future we may want to make this more like clone-on-write, where we only clone lazily if we need to do something destructive, but doing it unconditionally is never wrong, while doing it lazily brings more risk. The trade-off is in performance if a repository is big, and disk size.
Totally agree. If you have N destructive analyses, you'll want to ensure they all use the same instance so you don't clone the source repo. salsa
seems pretty well-positioned to provide that lazy functionality, but it's up to the analyses to make sure they call the appropriate get_writeable()
-type function.
Working directly with local repos presents a challenge for 3.5.0 feature #183 . This PR changes local repo handling to do a local
git clone
to$HC_CACHE/clones/local
. The subdir created in this path is returned and is used for all future operations on the repository.