GithubHelp home page GithubHelp logo

Comments (5)

Byron avatar Byron commented on July 30, 2024 1

Thanks for the hint, I will definitely take a look soonish!

If I understood git correctly, it really tries hard not to touch HEAD, and maybe the current gitoxide implementation is too broad to completely prohibit it. This might be a bug and I will see if that can just be enabled (except for setting HEAD), or if that should be configurable instead.

from gitoxide.

Jake-Shadle avatar Jake-Shadle commented on July 30, 2024 1

Yup I think those two constraints make total sense as they (probably) won't affect the use case of updating a bare repository since those tend to be managed via code rather than manually by a user, so this change would effectively give the same benefits as fetch + checkout but for bare repositories.

from gitoxide.

Byron avatar Byron commented on July 30, 2024 1

This will be fixed with the next release, I will post here when that happens. Figuring this out was quite some work, but as always, that is rewarded. Now I think the logic is finally sound and more tested, too, which should allow gix to mirror repos pretty nicely.

I added a third rule to the above, repeated here for completeness:


The new logic will happily update any refs, symbolic or not, if…

  • fast-forward rules aren't violated
  • the target ref is not currently checked out
  • existing refs would not become 'unborn', i.e. point to a reference that doesn't exist and won't be created due to ref-specs

from gitoxide.

Byron avatar Byron commented on July 30, 2024 1

This issue should be resolved with the latest release, but please let me know if anything is missing. Thanks you.

from gitoxide.

Byron avatar Byron commented on July 30, 2024

This will be improved with the next release, I will post here when that happens and it should be today or tomorrow - I am working on it.

It turns out that I definitely took a shortcut by simply not handling symbolic refs, which do complicate things quite a bit, but since some time passed I will it's a good time to tackle.
When using gix fetch I also noticed that it would refuse to do anything with origin/HEAD and thought that was unnecessary.

The new logic will happily update any refs, symbolic or not, if…

  • fast-forward rules aren't violated
  • if the target ref is not currently checked out

That should really be all that matters.

from gitoxide.

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.