mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-11-04 00:11:04 +00:00 
			
		
		
		
	- Resolves forgejo/discussions#324 - Remove all checks of `CheckGitVersionAtLeast` that checked for a version below 2.34.1 - The version was chosen because Debian stable supports 2.39.5 and Ubuntu 22.04 LTS supports 2.34.1 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8328 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-committed-by: Gusted <postmaster@gusted.xyz>
		
			
				
	
	
		
			18 lines
		
	
	
	
		
			516 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
	
		
			516 B
		
	
	
	
		
			Go
		
	
	
	
	
	
// Copyright 2022 The Gitea Authors. All rights reserved.
 | 
						|
// SPDX-License-Identifier: MIT
 | 
						|
 | 
						|
package git
 | 
						|
 | 
						|
import (
 | 
						|
	"context"
 | 
						|
	"fmt"
 | 
						|
)
 | 
						|
 | 
						|
// WriteCommitGraph write commit graph to speed up repo access
 | 
						|
// this requires git v2.18 to be installed
 | 
						|
func WriteCommitGraph(ctx context.Context, repoPath string) error {
 | 
						|
	if _, _, err := NewCommand(ctx, "commit-graph", "write").RunStdString(&RunOpts{Dir: repoPath}); err != nil {
 | 
						|
		return fmt.Errorf("unable to write commit-graph for '%s' : %w", repoPath, err)
 | 
						|
	}
 | 
						|
	return nil
 | 
						|
}
 |