Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Xgit.Repository.WorkingTree.ParseIndexFile.from_iodevice/1 fails if any extensions are present. #67

Closed
3 tasks done
scouten opened this issue Aug 11, 2019 · 2 comments · Fixed by #173
Closed
3 tasks done
Labels
bug Something isn't working TO DO Fix an incomplete implementation

Comments

@scouten
Copy link
Collaborator

scouten commented Aug 11, 2019

  • Add label: "TO DO"
  • Add label: "good first issue" or "help wanted" if appropriate
  • Add link to this issue in a comment near the TO DO comment

Describe What Is Incomplete
The function Xgit.Repository.WorkingTree.ParseIndexFile.from_iodevice/1 doesn't parse the content following the list of entries.

In a simple test case that I've built, there is a 32-byte block of data that I don't understand and I can't find any code in git or jgit that describes it. (I've since figured this out. See comment below.)

Definition of Done
At a minimum, it should be understanding extensions and the checksum at the end of the file.

@scouten scouten added bug Something isn't working help wanted Extra attention is needed TO DO Fix an incomplete implementation labels Aug 11, 2019
@scouten scouten changed the title Xgit.Core.IndexFile.from_iodevice/1 ignores content after entries. Xgit.Repository.WorkingTree.ParseIndexFile.from_iodevice/1 ignores content after entries. Aug 16, 2019
@scouten scouten removed the help wanted Extra attention is needed label Aug 19, 2019
@scouten
Copy link
Collaborator Author

scouten commented Aug 19, 2019

Turns out to have been a tooling error (hex dump tool I was using was doing latin1 -> utf8 expansion without my knowledge) and the 32-byte block was actually the 20-byte SHA-1 signature.

@scouten scouten changed the title Xgit.Repository.WorkingTree.ParseIndexFile.from_iodevice/1 ignores content after entries. Xgit.Repository.WorkingTree.ParseIndexFile.from_iodevice/1 fails if any extensions are present. Aug 19, 2019
@scouten
Copy link
Collaborator Author

scouten commented Aug 19, 2019

Update: As of #103, ParseIndexFile now validates the trailing SHA-1 hash. However, it still balks if any extensions are present. Leaving this issue open for that reason.

scouten added a commit that referenced this issue Sep 22, 2019
Skip all optional extensions; error out if any required extensions are present.

Closes #67. Introduces #172 (required extensions unsupported).
scouten added a commit that referenced this issue Sep 24, 2019
* MInimal extension support for index file parsing.

Skip all optional extensions; error out if any required extensions are present.

Closes #67. Introduces #172 (required extensions unsupported).

* Clean up test case handling.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working TO DO Fix an incomplete implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant