You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there enough interest/use-case for being able to specify gimme abcdef1234 to get a specific git sha and be able to do so repeatably, using cached builds rather than rebuilding each time?
If so, then this is a sketch of how we might do it:
Require a git new enough to support --reference
Maintain a bare repo at ~/.gimme/versions/go.git, use git fetch to update it
Whenever we build tip, or a specific SHA, resolve it first, then effectively do git clone --reference ~/.gimme/versions/go.git https://github.com/golang/go ~/.gimme/versions/ref.abcdef1234
Cache based on existence of that specific directory; resolve tip each time. This gives us working tip which updates but caches correctly
Have gimme update a log-file on each invocation, recording (timestamp, version)
Have gimme clean use the log-file to figure out any local version not used in the past two weeks (default) and nuke them.
There are problems with --reference but they relate to having one repo mapped into Docker but not the other repo. That should not be an issue with the internals of the gimme directory (and --dissociate is available if we really must bloat with redundant copies).
I'm tentatively willing to do this work, once 1.5.0 is out, as work for 1.6.0.
The text was updated successfully, but these errors were encountered:
Use a common git bare repo for fetching code, build from git in specific
directories so that each is reusable.
Cleans up some of the gunk/tech-debt I accrued earlier in version
parsing. I _think_ this approach succeeds with everything the earlier
approach did.
This is part 1 of addressing #147 where I sketched out the design; no
log-files yet.
This gives us the other part of multiple git builds, each isolated, per
issue #147.
Caveat: the use of aliases breaks the log-file's utility. For now, I'm
handling that by not implementing aliases for git and constraining clean
to be only for git. We can revisit if desired.
Is there enough interest/use-case for being able to specify
gimme abcdef1234
to get a specific git sha and be able to do so repeatably, using cached builds rather than rebuilding each time?If so, then this is a sketch of how we might do it:
git
new enough to support--reference
~/.gimme/versions/go.git
, usegit fetch
to update itgit clone --reference ~/.gimme/versions/go.git https://github.com/golang/go ~/.gimme/versions/ref.abcdef1234
tip
each time. This gives us workingtip
which updates but caches correctlygimme
update a log-file on each invocation, recording(timestamp, version)
gimme clean
use the log-file to figure out any local version not used in the past two weeks (default) and nuke them.There are problems with
--reference
but they relate to having one repo mapped into Docker but not the other repo. That should not be an issue with the internals of thegimme
directory (and--dissociate
is available if we really must bloat with redundant copies).I'm tentatively willing to do this work, once 1.5.0 is out, as work for 1.6.0.
The text was updated successfully, but these errors were encountered: