Giter VIP home page Giter VIP logo

Comments (4)

lukaszachy avatar lukaszachy commented on August 16, 2024

To elaborate a bit, As a user I want fmf to

  • clean after itself so my home/.cache stays clean
  • clean old stuff so I free some space on disk
  • fetch current remote so latest changes are present in metadata repository

At the moment we do git fetch if last fetch was more than 20 minutes ago but it is not configurable.

So how about adding option instead of command? To be a bit inspired by dnf: there is --refresh which forces metadata refresh and command 'dnf clean'

fmf --clean [time] [command] 
fmf --refresh [command]

So if you don't want to keep cache, you use --clean, fmf --clean will erase existing.
To keep just recent cache fmf --clean 1d if you recognize 1 day as recent ;)
Refresh all on fmf --refresh

from fmf.

lukaszachy avatar lukaszachy commented on August 16, 2024

@psss Thoughts? I'd try to implement it if you are OK with the above.

from fmf.

psss avatar psss commented on August 16, 2024

A couple of questions:

  • Would the --clean option erase the cache before doing the command or after? With a separate command one could do both and it would be clear when the cleanup happens.
  • Anything cached longer than 20 minutes is currently fetched again, so it probably does not make sense to only clean up items older than 1d, anything between 1d and 2m will not be (re)used anyway

So far the command variant seems to me as a better solution but I might be overlooking possible advantages of the option solution.

from fmf.

lukaszachy avatar lukaszachy commented on August 16, 2024

So far the command variant seems to me as a better solution but I might be overlooking possible advantages of the option solution.

How would you do, with single command, following?

  1. As a user I want fmf to ignore cache and fetch repositories directly
    UC: I've just pushed changes to the upstream
    fmf --refresh [commnad]
  2. As a user I want fmf to clean after itself so no files are left in .cache.
    fmf --clean [commnad]
    UC: I'm on shared machine / don't have much space left
  3. As a user I want fmf to ignore any cache (might not be there) and clean after itself.
    fmf --refresh --clean [command]

I prefer single command as it is easier to 'alias' or recall from bash history or even copy&paste from help or IRC

Good point that --clean [time] doesn't make sense.

from fmf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.