{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/26397","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/26397/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/26397/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/26397/events","html_url":"https://github.com/JuliaLang/julia/issues/26397","id":303948378,"number":26397,"title":"package without commit causes Pkg to crash","user":{"login":"gdkrmr","id":12512930,"avatar_url":"https://avatars1.githubusercontent.com/u/12512930?v=4","gravatar_id":"","url":"https://api.github.com/users/gdkrmr","html_url":"https://github.com/gdkrmr","followers_url":"https://api.github.com/users/gdkrmr/followers","following_url":"https://api.github.com/users/gdkrmr/following{/other_user}","gists_url":"https://api.github.com/users/gdkrmr/gists{/gist_id}","starred_url":"https://api.github.com/users/gdkrmr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdkrmr/subscriptions","organizations_url":"https://api.github.com/users/gdkrmr/orgs","repos_url":"https://api.github.com/users/gdkrmr/repos","events_url":"https://api.github.com/users/gdkrmr/events{/privacy}","received_events_url":"https://api.github.com/users/gdkrmr/received_events","type":"User","site_admin":false},"labels":[{"id":388665686,"url":"https://api.github.com/repos/JuliaLang/julia/labels/libgit2","name":"libgit2","color":"0e8a16","default":false},{"id":24139877,"url":"https://api.github.com/repos/JuliaLang/julia/labels/packages","name":"packages","color":"02e10c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-09T19:09:49Z","updated_at":"2018-03-13T20:05:10Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I started creating a package which had some files in it, the git repository was initialized but without commits and got this rather cryptic error when using `Pkg`, creating a first commit solved the situation:\r\n\r\n```\r\nERROR: GitError(Code:ENOTFOUND, Class:Reference, Revspec 'HEAD' not found.)\r\nmacro expansion at ./libgit2/error.jl:99 [inlined]\r\nBase.LibGit2.GitTree(::Base.LibGit2.GitRepo, ::String) at ./libgit2/repository.jl:116\r\n#isdiff#76(::Bool, ::Function, ::Base.LibGit2.GitRepo, ::String, ::String) at ./libgit2/libgit2.jl:147\r\n(::Base.LibGit2.#kw##isdiff)(::Array{Any,1}, ::Base.LibGit2.#isdiff, ::Base.LibGit2.GitRepo, ::String, ::String) at ./<missing>:0\r\n(::Base.Pkg.Read.##5#6{String})(::Base.LibGit2.GitRepo) at ./pkg/read.jl:184\r\nwith(::Base.Pkg.Read.##5#6{String}, ::Base.LibGit2.GitRepo) at ./libgit2/types.jl:608\r\nrequires_path(::String, ::Dict{VersionNumber,Base.Pkg.Types.Available}) at ./pkg/read.jl:183\r\nfixed(::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}, ::Dict{String,Tuple{VersionNumber,Bool}}, ::Set{String}, ::VersionNumber) at ./pkg/read.jl:229\r\nfixed(::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}, ::Dict{String,Tuple{VersionNumber,Bool}}) at ./pkg/read.jl:225\r\nedit(::Function, ::String, ::Base.Pkg.Types.VersionSet, ::Vararg{Base.Pkg.Types.VersionSet,N} where N) at ./pkg/entry.jl:30\r\n(::Base.Pkg.Entry.##1#3{String,Base.Pkg.Types.VersionSet})() at ./task.jl:335\r\nStacktrace:\r\n [1] sync_end() at ./task.jl:287\r\n [2] macro expansion at ./task.jl:303 [inlined]\r\n [3] add(::String, ::Base.Pkg.Types.VersionSet) at ./pkg/entry.jl:51\r\n [4] (::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}})() at ./pkg/dir.jl:36\r\n [5] cd(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}}, ::String) at ./file.jl:70\r\n [6] #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{String,N} where N) at ./pkg/dir.jl:36\r\n [7] add(::String) at ./pkg/pkg.jl:117\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/372800242","html_url":"https://github.com/JuliaLang/julia/issues/26397#issuecomment-372800242","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/26397","id":372800242,"user":{"login":"StefanKarpinski","id":153596,"avatar_url":"https://avatars2.githubusercontent.com/u/153596?v=4","gravatar_id":"","url":"https://api.github.com/users/StefanKarpinski","html_url":"https://github.com/StefanKarpinski","followers_url":"https://api.github.com/users/StefanKarpinski/followers","following_url":"https://api.github.com/users/StefanKarpinski/following{/other_user}","gists_url":"https://api.github.com/users/StefanKarpinski/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanKarpinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanKarpinski/subscriptions","organizations_url":"https://api.github.com/users/StefanKarpinski/orgs","repos_url":"https://api.github.com/users/StefanKarpinski/repos","events_url":"https://api.github.com/users/StefanKarpinski/events{/privacy}","received_events_url":"https://api.github.com/users/StefanKarpinski/received_events","type":"User","site_admin":false},"created_at":"2018-03-13T20:05:10Z","updated_at":"2018-03-13T20:05:10Z","author_association":"OWNER","body":"This is why PkgDev always creates a commit in a newly generated package. It's not really worth the annoyance of trying to deal with the \"there are no commits\" corner case. Git itself has tons of buggy corner cases around this situation."}}
{"actor":{"display_login":"StefanKarpinski"}}