Re: Avoid pruning some commits within a repo
- From: Dusty Mabe <dusty dustymabe com>
- To: Ryan Rueth <rrueth gmail com>, "ostree-list gnome org" <ostree-list gnome org>
- Subject: Re: Avoid pruning some commits within a repo
- Date: Mon, 25 Feb 2019 10:12:48 -0500
On 2/22/19 7:49 PM, Ryan Rueth via ostree-list wrote:
Hello,
We have a build repo that contains branches for multiple components of our build. This lets us skip
rebuilding components that already exist in the build repo, but the various components are re-built at
different frequencies. I'd like to prune old objects from this directory, but avoid deleting a component
that is still being used for the whole build.
Does anyone have any recommendations for how I might prune a repository, but avoid pruning some old commits
that are currently the HEADs of branches and still in use?
My current plan was to use the following to prune commits:
ostree --repo=<repo> prune --keep-younger-than='7 days ago' --refs-only
As an example, if I could do something like `touch` a commit that is the HEAD of a given branch to update
the timestamp, then I could just `touch` all of the commits that are used for the full build each time.
Thus, when the prune command ran, the still-in-use commits would be more recent than 7 days old.
I did some exploration in this space a little bit ago:
https://dustymabe.com/2018/03/04/pruning-policy-for-specific-branches-of-ostree-repos/
I don't know if this is exactly what you are looking for (i.e. what happens if a commit is
in the history of multiple branches?) but maybe it's a start. You might find some new enhancement
requests as part of your work.
Dusty
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]