git

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGitRepository

func CreateGitRepository(repoPath, gitignore string) error

CreateGitRepository initializes a new bare Git repository at the specified path and sets up a post-receive hook.

It performs the following steps:

  1. Creates a bare Git repository in the given directory.
  2. Reads the post-receive template content from the embedded templates.
  3. Creates a post-receive hook using the template content.

If any step fails, an error is returned with details.

func DeleteGitRepository

func DeleteGitRepository(repoPath string) error

DeleteGitRepository removes a Git repository at the given path.

The function will:

  • Remove the directory at the given path and all its contents

If the removal fails, an error is returned with details.

func UpdateGitRepository

func UpdateGitRepository(repoPath, newPath string) error

UpdateGitRepository updates an existing Git repository by renaming its path.

The function will:

  • Rename the directory at the given repository path to the new path.

If the renaming fails, an error is returned with details.

Types

type GigtignorePage

type GigtignorePage struct {
	Payload struct {
		Blob struct {
			RawLines []string `json:"rawLines"`
		} `json:"blob"`
	} `json:"payload"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL