-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change git paths to always be / separated #80
Conversation
@@ -135,17 +135,27 @@ end""" | |||
|
|||
@testset "testing package tags" begin | |||
PkgDev.generate("PackageWithTags", "MIT", config=Dict("user.name"=>"Julia Test", "user.email"=>"[email protected]")) | |||
PkgDev.register("PackageWithTags") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like it needs a url (github username in the config maybe?)
@@ -132,20 +132,36 @@ end""" | |||
end | |||
end | |||
|
|||
if haskey(ENV, "CI") && lowercase(ENV["CI"]) == "true" | |||
info("setting git global configuration") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref #58 (diff) it would probably be better to set HOME to somewhere temporary for this as part of temp_pkg_dir
rather than doing things differently on CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried
const tmphomedir = mktempdir()
withenv("HOME" => tmphomedir, "JULIA_PKGDIR" => tmpdir) do
info("setting git global configuration")
run(`git config --global user.name "Julia Test"`)
run(`git config --global user.email [email protected]`)
run(`git config --global github.user JuliaTest`)
@test !isdir(Pkg.dir())
try
Pkg.init()
@test isdir(Pkg.dir())
Pkg.resolve()
fn(Pkg.Dir.path())
finally
remove_tmp_dir && (rm(tmpdir, recursive=true); rm(tmphomedir, recursive=true))
end
end
in temp_pkg_dir()
, but that doesn't work because
withenv("HOME" => mktempdir()) do
run(`git config --global github.user JuliaTest`)
LibGit2.getconfig("github.user", "")
end
doesn't return JuliaTest
for some reason... Not sure what's going on there -- maybe HOME
isn't properly passed on to libgit2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm. i wonder whether that's an issue in the c library or something our bindings have control over
fixes #28.
The
LibGit2.isdirty
test always succeeds for some reason, even though it should be callinggit_diff_tree_to_workdir_with_index
which should be diffing the index against the working directory... Should maybe wrapgit_diff_index_to_workdir
or figure out whyisdirty
behaves the way it does.