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

Version history is broken when a non-existent ID is referenced in a data commit #53

Open
connorhsm opened this issue Aug 3, 2024 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@connorhsm
Copy link
Member

Due to the way twotech searches by commit history, if a single commit in OneLifeData7 references an object ID that does not exist, processing fails, even if this is corrected by a later commit.

There may be further detail, and this may function slightly different to how I am aware at this moment.

This has previously been resolved by hard-coding problem items.

fileContent(sha, path) {
// Dear future reader
// Curse object 8316. This is a last ditch effort to fix it.
// Broken commit causing errors. An object was removed before all references to it was.
// https://github.com/twohoursonelife/OneLifeData7/commit/8833527cbbb2d5d3d65f174a7d412cfa7fe5cbbe
if (path == "objects/8316.txt") {
path = "objects/8317.txt";
}
if (path == "objects/13507.txt") {
path = "objects/8317.txt"
}
// Another unpleasant fix for Data7 issues.
// https://github.com/twohoursonelife/twotech/issues/15
if (path == "transitions/11104_11110_CONT") {
path = "transitions/11104_11110_CONT .txt";
}
if (path == "transitions/11110_6701_CONT") {
path = "transitions/11110_6701_CONT .txt";
}
return this.run("show", `${sha}:${path}`);
}

@connorhsm connorhsm added bug Something isn't working help wanted Extra attention is needed labels Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant