Code Monkey home page Code Monkey logo

Comments (7)

neithernut avatar neithernut commented on June 3, 2024

Thanks for the report! Will investigate as soon as I'm back from work.

In the meantime you can add the following refspec line to the [remote "origin"] section of your local repos .git/config:

fetch = +refs/dit/*:refs/remotes/origin/dit/*

It will cause git to fetch the "dit" refs we use on a regular fetch.


Sidenote: we planned to add a "subscription" feature which adds that refspec to the config in a more user-friendly way.

from git-dit.

jan-matejka avatar jan-matejka commented on June 3, 2024

This looks like a workaround. Is this a workaround or something to help you debug?
I am in the evaluation phase right now so I don't mind waiting a bit for fix.
fyi I encountered this issue when trying a push. I used fetch in the example since it exhibits the same issue and is simpler to set up.

from git-dit.

neithernut avatar neithernut commented on June 3, 2024

This looks like a workaround. Is this a workaround or something to help you debug?

It's a workaround. Kinda. Actually, that's how I set up remotes for git-dit for myself. I think I never really used git dit push and git dit fetch, apart from testing its functionality.

from git-dit.

neithernut avatar neithernut commented on June 3, 2024

I can reproduce. The error apparently also occurs with other schemas (including ssh://). URLs like user@host:/path/foo.git appear to work fine, at least for ssh. I suspect this will take some time.

The error likely originates from libgit2. So far I've found three possible origins: in the ssh, git transports and in netopts.c. Interestingly, the only one setting the InvalidSpec error code appears to be the last one, but it could as well be set further up the stack.

from git-dit.

neithernut avatar neithernut commented on June 3, 2024

I just started investigating the issue some more. The error is emitted in netopts.c. Apparently http_parser_parse_url fails to parse the host (here) using http_parse_host. In there, everything works fine until we reach some sanity check. As we end up at the beginning of the "port" field, the check fails.

I'll report this upstream, but it will take a while until we benefit from a fix, since we have to wait for a git2-rs to pick up the fix/the next release. I'll leave this issue open until the changes have reached us.

A workaround is to use the schema-less form for ssh origins (e.g. user@host:/path/foo.git) or without the (empty) port (e,g, ssh://user@host/path/foo.git). Also note that using the ssh+git schema is generally discouraged.

from git-dit.

neithernut avatar neithernut commented on June 3, 2024

I just reported the issue upstream: libgit2/libgit2#5100

from git-dit.

neithernut avatar neithernut commented on June 3, 2024

The underlying issue was fixed in https://github.com/libgit2/libgit2, a fixed version was picked up by https://github.com/rust-lang/git2-rs (0.9.2 or later). A cargo update and rebuild should resolve the issue.

I can't test it right now due to other issues. However, I'll close this issue regardless. Please reopen if the issue persists.

from git-dit.

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.