Skip to content
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

Merged
merged 2 commits into from
Oct 12, 2016

Conversation

pfitzseb
Copy link
Member

@pfitzseb pfitzseb commented Oct 3, 2016

fixes #28.

The LibGit2.isdirty test always succeeds for some reason, even though it should be calling git_diff_tree_to_workdir_with_index which should be diffing the index against the working directory... Should maybe wrap git_diff_index_to_workdir or figure out why isdirty behaves the way it does.

@@ -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")
Copy link
Contributor

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")
Copy link
Contributor

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

Copy link
Member Author

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?

Copy link
Contributor

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

@tkelman tkelman merged commit 21e3020 into JuliaLang:master Oct 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

write_tag_metadata does not add files on Windows
2 participants