Giter Site home page Giter Site logo

Comments (4)

JakeStanger avatar JakeStanger commented on July 3, 2024 3

This sounds like a good idea. I envision a push_to_remote setting in the dura repo config, which defaults to false.

I've changed my mind about 5 times while writing this so if anybody has anything to add please do, but I think we should go with the refs model. The main reason for this is the git config option won't work if a repo already has remote.origin.push set.

Should old branches be retroactively updated? These would need to be updated when the repo is polled, and probably cached in the runtime.db to avoid unnecessary work. Alternatively we could fire-and-forget, and just set the setting when the branch is created. I'm not sure how well that'd work with the proposed changes in #9 though.

from dura.

tkellogg avatar tkellogg commented on July 3, 2024

This is good to think about. I know there's another cohort of dura users that want to always push dura branches somewhere and not think about it. Branch management needs more thought.

Are there any global config variables we can set to prevent this?

from dura.

dswij avatar dswij commented on July 3, 2024

I think you can tell git which refs you would like to push/not-push with remote.<remote-name>.push. So I assume it's something like git config --add remote.origin.push '^refs/heads/dura/*'.

Important note is that negative ref-spec is only recently added., and using git push --all will still push dura/* branches anyway.

Another idea that just came to my mind is for dura to create a new refs instead. So instead of acting under refs/heads/dura/*, dura will use refs/dura/*, with the added benefit that most of git commands won't take anything under refs/dura for consideration (e.g. git branch). I'm not so sure if this is a good idea though, I haven't found a way to use common commands in git to tinker with refs comfortably.

from dura.

ciil avatar ciil commented on July 3, 2024

If this functionality is implemented, there probably needs to be an overall/default option regarding the frequency with which to push because I hardly think most users would want pushes every few seconds (if saving frequently). Maybe even something like a distinct pushurl from the repo config for dura branches so that not everything is immediately pushed to e.g. a public github repo but can still be safe offsite.

from dura.

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.