Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Ref lookup fails if file in refs/heads has no newline #109

Closed
nickh opened this Issue · 3 comments

3 participants

@nickh

Using 0.16.0, I'm seeing this:

>> File.read("#{@rugged.path}/refs/heads/master")
=> "0cbbd95d6fc7c1258d32ef9de7c1c2bc9d82e37f"
>> Rugged::Reference.lookup( @rugged, 'refs/heads/master')
RuntimeError: Failed to lookup reference 
    - Failed to lookup reference 
    - Failed to lookup reference from packfile
(error code -28)
    from (irb):8:in `lookup'
    from (irb):8

If I add a newline to the end of the refs/heads/master file, it works:

>> File.read("#{@rugged.path}/refs/heads/master")
=> "0cbbd95d6fc7c1258d32ef9de7c1c2bc9d82e37f\n"
>> Rugged::Reference.lookup( @rugged, 'refs/heads/master')
=> #<Rugged::Reference:0x101745e08>
@vmg
Owner

I think this has been fixed in development for quite a while. Let me double check.

@gcapizzi

Can this be closed?

@vmg
Owner
vmg commented

Yes! This has been fixed!

@vmg vmg closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.