Jarred-Sumner / git-peek

git repo to local editor instantly
MIT License
716 stars 17 forks source link

[Feature Request] Configurable temp path #8

Closed glitsj16 closed 3 years ago

glitsj16 commented 3 years ago

Great piece of software, just played with it a bit. Although git-peek nicely cleans up after closing the editor, there's potential for bringing a system down by saving to /tmp by default. On most Linux systems /tmp is mounted as tmpfs, meaning that whatever is dropped there, even temporarily, eats into RAM.

I realize that this doesn't pose (much) problems with relatively small repositories, but I wonder if there's some kind of size limit check before committing to download a huge repo. For example, what if one wants to take a quick peek at what Linus Torvalds is doing in the Linux kernel repo (+4GB)? To avoid this potential pitfall it would be nice to have a user-configurable knob to store temporary files at a different location.

Jarred-Sumner commented 3 years ago

Added in 1.1.27!