-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
500 Internal server error when visiting link for Pro Git v1 book #1782
Comments
hey @HonkingGoose @derberg, can you share where did you find links to book v1? either way, it seems reasonable to redirect to some page. probably we removed the routing because v1 is really old AFAIK (i see v2 was released around 2014) |
According to the first issue there are links pointing to the v1 version of the book in the GitHub Docs. I will open a PR in the GitHub Docs repo to fix the links. |
I tried making the changes to the GitHub Docs myself, but I'm not allowed to touch the files with the bad links in it. So I'm opening an issue with GitHub Docs, so one of their maintainers can fix it. 😄 |
I'll let you guys decide. Possible fixes:
|
For the record: after #1804 was merged, the link no longer 500s but 404s instead. |
Related: I found this link which doesn’t say anything about the edition: https://git-scm.com/book/en/Git-Tools-Rewriting-History But this works: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History The second edition. Maybe the first link could try to redirect to |
@LemmingAvalanche good idea! We should automate this by patching in aliases here (both @LemmingAvalanche want to give it a try? |
@dscho Sure thing, I can look at this this evening. I’ll reply later if it turns out that it needs someone more experienced. |
@LemmingAvalanche thank you for clarifying (in a separate, private communication) that you were thinking of redirecting: https://git-scm.com/book/en/Git-Tools-Rewriting-History To: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History I indeed misunderstood, or maybe it was a Freudian mistake, as the information necessary to reliably map the sections of v1 to v2 is simply not available in the current version of But maybe you can add that mapping, say, as |
I had a look, @LemmingAvalanche, just to see the breadth of the effort. Here is a link to Pro Git v1 in the Internet Archive, as of January 2nd, 2014, around the time the 2nd revision was started. ProGit v1 table of contents
And here is the current version of the ProGit v2 book: ProGit v2 table of contents
And here is the result of my best effort at mapping them:
As you can see, there are quite a few gaps, in particular in chapter 4 there are gaps on the v2 side, which means they are unmappable. Still, these could potentially be mapped, likely via appending aliases here after adding a manual mapping like this: v1_mapping = {
"1.1" => "/book/en/Getting-Started-About-Version-Control",
"1.2" => "/book/en/Getting-Started-A-Short-History-of-Git",
...
}
...
v1_path = v1_mapping[self.cs_number]
unless v1_path.nil?
front_matter["aliases"] = [] if front_matter["aliases"].nil?
front_matter["aliases"] << v1_path
end The mapping would need to be crafted manually, of course. However, the challenges are not stopping there. What about anchors? As a concrete example: /book/en/Git-Basics-Getting-a-Git-Repository#Cloning-an-Existing-Repository would need to be mapped to /book/en/v2/Git-Basics-Getting-a-Git-Repository#_git_cloning. That is not really automatable, I think. And then I would like to draw your attention to the fact that the ProGit v1 book had translation which would need to be handled, too:
tl;dr this would be a huge effort. Given that the v1 URLs have stopped working over four years ago, I consider this not worth doing. |
@dscho Thank you for doing that research. I agree that it’s best to not do anything here. All I’ve done on this subject is to search Stackoverflow for v1 links and update them when there is a v2 mapping. That’s what we can do at this stage (all these years later). |
How about creating a landing page for incoming "progit v1 link users"? Like this:
This way you avoid doing any manual mapping from v1 to v2. And you give users a simple way to recover from the outdated link. |
@HonkingGoose that would require hosting a server so that arbitrary There is some sort of an option to do wildcard routes: https://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository#Cloning-an-Existing-Repository serves the 404.html page. Javascript could be added to that page to detect v1 book links and reroute, but that would not work for browsers (or crawlers) that have (nor want) Javascript support. What we could do is to scrape the v1 links from the Internet Archive and then present them as aliases for something like this new "ProGit v1 landing page". But that would already be 90% of the work to redirect them (modulo anchor) to the v2 pages. So I think that if we already do the work to identify all of the v1 links, we might just as well go the whole nine yards and save us the work of creating a new page. |
Once upon a time, there first edition of the ProGit book was available on Git's home page, and the sun was shining. Then, one day in 2014, the sun shone brighter and work was begun to write the second edition of this book. At some stage, this became the default when directing web browsers to https://git-scm.com/book, and a few years later, 2020 or so, the links that formerly led to the first edition would redirect to v2. Then, one day, clouds moved across the sky and the redirects from v1 to v2 stopped working and instead a "500 Internal server error" page was shown. Time went by and nobody really knew how to fix it (or more likely, wasn't in the mood, or wanted other people to fix it). Finally, in the fall of 2024, git-scm.com was switched to a static web site, generated using Hugo, and local development became much easier. Naturally, the v1-to-v2 redirects were no longer in place and the v1 links therefore showed 500 no longer, but a 404. Still, nobody knew how to fix it, or wasn't in the mood, or wanted other people to fix it for them. Until now. Now is the day when we resurrect the v1-to-v2 redirects, in even more glory than ever before, for now we redirect to the v2 sections that correspond to the v1 sections (as far as possible, that is)! Only one (slight) fly in the ointment: URLs to v1 sections of the book which contain anchors will keep those anchors as-are, and not translate them to the corresponding new anchors. Example: Git-Basics-Getting-a-Git-Repository#Cloning-an-Existing-Repository should redirect to v2/Git-Basics-Getting-a-Git-Repository#_git_cloning, but does not. It redirects to that page but still tries to find the anchor `#Cloning-an-Existing-Repository`. Alas, this is where I do not know how to fix it, or ain't in the mood, or want other people to fix it for themselves. This commit addresses git#1782 Signed-off-by: Johannes Schindelin <[email protected]>
Once upon a time, there first edition of the ProGit book was available on Git's home page, and the sun was shining. Then, one day in 2014, the sun shone brighter and work was begun to write the second edition of this book. At some stage, this became the default when directing web browsers to https://git-scm.com/book, and a few years later, 2020 or so, the links that formerly led to the first edition would redirect to v2. Then, one day, clouds moved across the sky and the redirects from v1 to v2 stopped working and instead a "500 Internal server error" page was shown. Time went by and nobody really knew how to fix it (or more likely, wasn't in the mood, or wanted other people to fix it). Finally, in the fall of 2024, git-scm.com was switched to a static web site, generated using Hugo, and local development became much easier. Naturally, the v1-to-v2 redirects were no longer in place and the v1 links therefore showed 500 no longer, but a 404. Still, nobody knew how to fix it, or wasn't in the mood, or wanted other people to fix it for them. Until now. Now is the day when we resurrect the v1-to-v2 redirects, in even more glory than ever before, for now we redirect to the v2 sections that correspond to the v1 sections (as far as possible, that is)! Only one (slight) fly in the ointment: URLs to v1 sections of the book which contain anchors will keep those anchors as-are, and not translate them to the corresponding new anchors. Example: Git-Basics-Getting-a-Git-Repository#Cloning-an-Existing-Repository should redirect to v2/Git-Basics-Getting-a-Git-Repository#_git_cloning, but does not. It redirects to that page but still tries to find the anchor `#Cloning-an-Existing-Repository`. Alas, this is where I do not know how to fix it, or ain't in the mood, or want other people to fix it for themselves. This commit addresses git#1782 Signed-off-by: Johannes Schindelin <[email protected]>
Once upon a time, there first edition of the ProGit book was available on Git's home page, and the sun was shining. Then, one day in 2014, the sun shone brighter and work was begun to write the second edition of this book. At some stage, this became the default when directing web browsers to https://git-scm.com/book, and a few years later, 2020 or so, the links that formerly led to the first edition would redirect to v2. Then, one day, clouds moved across the sky and the redirects from v1 to v2 stopped working and instead a "500 Internal server error" page was shown. Time went by and nobody really knew how to fix it (or more likely, wasn't in the mood, or wanted other people to fix it). Finally, in the fall of 2024, git-scm.com was switched to a static web site, generated using Hugo, and local development became much easier. Naturally, the v1-to-v2 redirects were no longer in place and the v1 links therefore showed 500 no longer, but a 404. Still, nobody knew how to fix it, or wasn't in the mood, or wanted other people to fix it for them. Until now. Now is the day when we resurrect the v1-to-v2 redirects, in even more glory than ever before, for now we redirect to the v2 sections that correspond to the v1 sections (as far as possible, that is)! Only one (slight) fly in the ointment: URLs to v1 sections of the book which contain anchors will keep those anchors as-are, and not translate them to the corresponding new anchors. Example: Git-Basics-Getting-a-Git-Repository#Cloning-an-Existing-Repository should redirect to v2/Git-Basics-Getting-a-Git-Repository#_git_cloning, but does not. It redirects to that page but still tries to find the anchor `#Cloning-an-Existing-Repository`. Alas, this is where I do not know how to fix it, or ain't in the mood, or want other people to fix it for themselves. This commit addresses git#1782 Signed-off-by: Johannes Schindelin <[email protected]>
Once upon a time, there first edition of the ProGit book was available on Git's home page, and the sun was shining. Then, one day in 2014, the sun shone brighter and work was begun to write the second edition of this book. At some stage, this became the default when directing web browsers to https://git-scm.com/book, and a few years later, 2020 or so, the links that formerly led to the first edition would redirect to v2. Then, one day, clouds moved across the sky and the redirects from v1 to v2 stopped working and instead a "500 Internal server error" page was shown. Time went by and nobody really knew how to fix it (or more likely, wasn't in the mood, or wanted other people to fix it). Finally, in the fall of 2024, git-scm.com was switched to a static web site, generated using Hugo, and local development became much easier. Naturally, the v1-to-v2 redirects were no longer in place and the v1 links therefore showed 500 no longer, but a 404. Still, nobody knew how to fix it, or wasn't in the mood, or wanted other people to fix it for them. Until now. Now is the day when we resurrect the v1-to-v2 redirects, in even more glory than ever before, for now we redirect to the v2 sections that correspond to the v1 sections (as far as possible, that is)! Only one (slight) fly in the ointment: URLs to v1 sections of the book which contain anchors will keep those anchors as-are, and not translate them to the corresponding new anchors. Example: Git-Basics-Getting-a-Git-Repository#Cloning-an-Existing-Repository should redirect to v2/Git-Basics-Getting-a-Git-Repository#_git_cloning, but does not. It redirects to that page but still tries to find the anchor `#Cloning-an-Existing-Repository`. Alas, this is where I do not know how to fix it, or ain't in the mood, or want other people to fix it for themselves. This commit addresses git#1782 Signed-off-by: Johannes Schindelin <[email protected]>
Once upon a time, there first edition of the ProGit book was available on Git's home page, and the sun was shining. Then, one day in 2014, the sun shone brighter and work was begun to write the second edition of this book. At some stage, this became the default when directing web browsers to https://git-scm.com/book, and a few years later, 2020 or so, the links that formerly led to the first edition would redirect to v2. Then, one day, clouds moved across the sky and the redirects from v1 to v2 stopped working and instead a "500 Internal server error" page was shown. Time went by and nobody really knew how to fix it (or more likely, wasn't in the mood, or wanted other people to fix it). Finally, in the fall of 2024, git-scm.com was switched to a static web site, generated using Hugo, and local development became much easier. Naturally, the v1-to-v2 redirects were no longer in place and the v1 links therefore showed 500 no longer, but a 404. Still, nobody knew how to fix it, or wasn't in the mood, or wanted other people to fix it for them. Until now. Now is the day when we resurrect the v1-to-v2 redirects, in even more glory than ever before, for now we redirect to the v2 sections that correspond to the v1 sections (as far as possible, that is)! Only one (slight) fly in the ointment: URLs to v1 sections of the book which contain anchors will keep those anchors as-are, and not translate them to the corresponding new anchors. Example: Git-Basics-Getting-a-Git-Repository#Cloning-an-Existing-Repository should redirect to v2/Git-Basics-Getting-a-Git-Repository#_git_cloning, but does not. It redirects to that page but still tries to find the anchor `#Cloning-an-Existing-Repository`. Alas, this is where I do not know how to fix it, or ain't in the mood, or want other people to fix it for themselves. This commit addresses git#1782 Signed-off-by: Johannes Schindelin <[email protected]>
And that wasn't too much work on top of what I already poured into this here ticket: #1915. |
Once upon a time, there first edition of the ProGit book was available on Git's home page, and the sun was shining. Then, one day in 2014, the sun shone brighter and work was begun to write the second edition of this book. At some stage, this became the default when directing web browsers to https://git-scm.com/book, and a few years later, 2020 or so, the links that formerly led to the first edition would redirect to v2. Then, one day, clouds moved across the sky and the redirects from v1 to v2 stopped working and instead a "500 Internal server error" page was shown. Time went by and nobody really knew how to fix it (or more likely, wasn't in the mood, or wanted other people to fix it). Finally, in the fall of 2024, git-scm.com was switched to a static web site, generated using Hugo, and local development became much easier. Naturally, the v1-to-v2 redirects were no longer in place and the v1 links therefore showed 500 no longer, but a 404. Still, nobody knew how to fix it, or wasn't in the mood, or wanted other people to fix it for them. Until now. Now is the day when we resurrect the v1-to-v2 redirects, in even more glory than ever before, for now we redirect to the v2 sections that correspond to the v1 sections (as far as possible, that is)! Only one (slight) fly in the ointment: URLs to v1 sections of the book which contain anchors will keep those anchors as-are, and not translate them to the corresponding new anchors. Example: Git-Basics-Getting-a-Git-Repository#Cloning-an-Existing-Repository should redirect to v2/Git-Basics-Getting-a-Git-Repository#_git_cloning, but does not. It redirects to that page but still tries to find the anchor `#Cloning-an-Existing-Repository`. Alas, this is where I do not know how to fix it, or ain't in the mood, or want other people to fix it for themselves. This commit addresses git#1782 Signed-off-by: Johannes Schindelin <[email protected]>
@LemmingAvalanche @HonkingGoose could you please review that PR? |
Once upon a time, there first edition of the ProGit book was available on Git's home page, and the sun was shining. Then, one day in 2014, the sun shone brighter and work was begun to write the second edition of this book. At some stage, this became the default when directing web browsers to https://git-scm.com/book, and a few years later, 2020 or so, the links that formerly led to the first edition would redirect to v2. Then, one day, clouds moved across the sky and the redirects from v1 to v2 stopped working and instead a "500 Internal server error" page was shown. Time went by and nobody really knew how to fix it (or more likely, wasn't in the mood, or wanted other people to fix it). Finally, in the fall of 2024, git-scm.com was switched to a static web site, generated using Hugo, and local development became much easier. Naturally, the v1-to-v2 redirects were no longer in place and the v1 links therefore showed 500 no longer, but a 404. Still, nobody knew how to fix it, or wasn't in the mood, or wanted other people to fix it for them. Until now. Now is the day when we resurrect the v1-to-v2 redirects, in even more glory than ever before, for now we redirect to the v2 sections that correspond to the v1 sections (as far as possible, that is)! Only one (slight) fly in the ointment: URLs to v1 sections of the book which contain anchors will keep those anchors as-are, and not translate them to the corresponding new anchors. Example: Git-Basics-Getting-a-Git-Repository#Cloning-an-Existing-Repository should redirect to v2/Git-Basics-Getting-a-Git-Repository#_git_cloning, but does not. It redirects to that page but still tries to find the anchor `#Cloning-an-Existing-Repository`. Alas, this is where I do not know how to fix it, or ain't in the mood, or want other people to fix it for themselves. This commit addresses git#1782 Signed-off-by: Johannes Schindelin <[email protected]>
Once upon a time, there first edition of the ProGit book was available on Git's home page, and the sun was shining. Then, one day in 2014, the sun shone brighter and work was begun to write the second edition of this book. At some stage, this became the default when directing web browsers to https://git-scm.com/book, and a few years later, 2020 or so, the links that formerly led to the first edition would redirect to v2. Then, one day, clouds moved across the sky and the redirects from v1 to v2 stopped working and instead a "500 Internal server error" page was shown. Time went by and nobody really knew how to fix it (or more likely, wasn't in the mood, or wanted other people to fix it). Finally, in the fall of 2024, git-scm.com was switched to a static web site, generated using Hugo, and local development became much easier. Naturally, the v1-to-v2 redirects were no longer in place and the v1 links therefore showed 500 no longer, but a 404. Still, nobody knew how to fix it, or wasn't in the mood, or wanted other people to fix it for them. Until now. Now is the day when we resurrect the v1-to-v2 redirects, in even more glory than ever before, for now we redirect to the v2 sections that correspond to the v1 sections (as far as possible, that is)! Only one (slight) fly in the ointment: URLs to v1 sections of the book which contain anchors will keep those anchors as-are, and not translate them to the corresponding new anchors. Example: Git-Basics-Getting-a-Git-Repository#Cloning-an-Existing-Repository should redirect to v2/Git-Basics-Getting-a-Git-Repository#_git_cloning, but does not. It redirects to that page but still tries to find the anchor `#Cloning-an-Existing-Repository`. Alas, this is where I do not know how to fix it, or ain't in the mood, or want other people to fix it for themselves. This commit addresses git#1782 Signed-off-by: Johannes Schindelin <[email protected]>
URL for broken page
https://git-scm.com/book/en/v1
Problem
The page linked above leads to a 500 Internal Server Error.
Operating system and browser
macOS 13, Firefox 113.0.1
Steps to reproduce
Other details
The Pro Git book is on version 2 now. We should probably redirect to the landing page for the v2 book.
Related issue (filed in the wrong place):
The text was updated successfully, but these errors were encountered: