Skip to content

Commit 8bee7fc

Browse files
authored
update git book link to v2 (#32221)
Fix the dead link `https://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository` for empty repositories to help how to clone the repository to `https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository` which is v2 of the git book. This also updates download git links
1 parent f9a9b08 commit 8bee7fc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

modules/git/git.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ func SetExecutablePath(path string) error {
111111

112112
func ensureGitVersion() error {
113113
if !DefaultFeatures().CheckVersionAtLeast(RequiredVersion) {
114-
moreHint := "get git: https://git-scm.com/download/"
114+
moreHint := "get git: https://git-scm.com/downloads"
115115
if runtime.GOOS == "linux" {
116116
// there are a lot of CentOS/RHEL users using old git, so we add a special hint for them
117117
if _, err := os.Stat("/etc/redhat-release"); err == nil {
118118
// ius.io is the recommended official(git-scm.com) method to install git
119-
moreHint = "get git: https://git-scm.com/download/linux and https://ius.io"
119+
moreHint = "get git: https://git-scm.com/downloads/linux and https://ius.io"
120120
}
121121
}
122122
return fmt.Errorf("installed git version %q is not supported, Gitea requires git version >= %q, %s", DefaultFeatures().gitVersion.Original(), RequiredVersion, moreHint)

templates/repo/empty.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</h4>
2525
<div class="ui attached guide table segment empty-repo-guide">
2626
<div class="item">
27-
<h3>{{ctx.Locale.Tr "repo.clone_this_repo"}} <small>{{ctx.Locale.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository"}}</small></h3>
27+
<h3>{{ctx.Locale.Tr "repo.clone_this_repo"}} <small>{{ctx.Locale.Tr "repo.clone_helper" "http://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository"}}</small></h3>
2828

2929
<div class="repo-button-row">
3030
{{if and .CanWriteCode (not .Repository.IsArchived)}}

0 commit comments

Comments
 (0)