JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.4k stars 5.45k forks source link

libgit2 path issues #18724

Open pfitzseb opened 7 years ago

pfitzseb commented 7 years ago

There are a couple of issues with the current implementation (or the docs) of LibGit2: Functions like LibGit2.add! take a files argument, which must be (as per here)

Since there are no docs for the functions libgit2/index.jl that's a bit of a usability problem which e.g. caused PkgDev.tag to not work on Windows (see https://github.com/JuliaLang/PkgDev.jl/issues/28).

I'd suggest to either

or

I can look into preparing a PR for either of the above if someone decides what to do, but maybe someone more familiar with the codebase would be better suited to do that.

cc @tkelman

tkelman commented 7 years ago

We should attempt to identify which of these limitations come from the c library and which are self inflicted bugs. Command line git lets you use abs paths but errors if you try to add something that's not inaide the current repo, right?

pfitzseb commented 7 years ago

See here and here: libgit2 only allows you to use forward slashes in functions that take git paths (as opposed to filesystem paths), so it's mostly a limitation (or decision, rather) with the c library. I'd argue we should be working around that though.

tkelman commented 7 years ago

Good find. I agree with you and think we should try to do some obvious manipulations before sending to the c library in the bindings instead of needing every user to test and work around the same issues (or all hit this problem if they don't)