fork of go-git with some jj specific features

_examples: Add call to config example

Signed-off-by: Paulo Gomes <pjbgf@linux.com>

Changed files
+9 -1
_examples
+1
_examples/README.md
··· 12 a repository using a GitHub personal access token. 13 - [ssh private key](clone/auth/ssh/private_key/main.go) - Cloning a repository using a ssh private key. 14 - [ssh agent](clone/auth/ssh/ssh_agent/main.go) - Cloning a repository using ssh-agent. 15 - [commit](commit/main.go) - Commit changes to the current branch to an existent repository. 16 - [push](push/main.go) - Push repository to default remote (origin). 17 - [pull](pull/main.go) - Pull changes from a remote repository.
··· 12 a repository using a GitHub personal access token. 13 - [ssh private key](clone/auth/ssh/private_key/main.go) - Cloning a repository using a ssh private key. 14 - [ssh agent](clone/auth/ssh/ssh_agent/main.go) - Cloning a repository using ssh-agent. 15 + - [config](config/main.go) - Explains how to work with config files. 16 - [commit](commit/main.go) - Commit changes to the current branch to an existent repository. 17 - [push](push/main.go) - Push repository to default remote (origin). 18 - [pull](pull/main.go) - Pull changes from a remote repository.
+1
_examples/common_test.go
··· 19 "checkout": {defaultURL, tempFolder(), "35e85108805c84807bc66a02d91535e1e24b38b9"}, 20 "checkout-branch": {defaultURL, tempFolder(), "branch"}, 21 "clone": {defaultURL, tempFolder()}, 22 "commit": {cloneRepository(defaultURL, tempFolder())}, 23 "context": {defaultURL, tempFolder()}, 24 "custom_http": {defaultURL},
··· 19 "checkout": {defaultURL, tempFolder(), "35e85108805c84807bc66a02d91535e1e24b38b9"}, 20 "checkout-branch": {defaultURL, tempFolder(), "branch"}, 21 "clone": {defaultURL, tempFolder()}, 22 + "config": {}, 23 "commit": {cloneRepository(defaultURL, tempFolder())}, 24 "context": {defaultURL, tempFolder()}, 25 "custom_http": {defaultURL},
+7 -1
_examples/config/main.go
··· 1 package main 2 3 import ( 4 "github.com/go-git/go-git/v5" 5 . "github.com/go-git/go-git/v5/_examples" 6 ··· 12 // - Set basic local config params 13 14 func main() { 15 Info("git init") 16 - r, err := git.PlainInit(".", false) 17 CheckIfError(err) 18 19 // Load the configuration
··· 1 package main 2 3 import ( 4 + "os" 5 + 6 "github.com/go-git/go-git/v5" 7 . "github.com/go-git/go-git/v5/_examples" 8 ··· 14 // - Set basic local config params 15 16 func main() { 17 + tmp, err := os.MkdirTemp("", "go-git-example") 18 + CheckIfError(err) 19 + defer os.RemoveAll(tmp) 20 + 21 Info("git init") 22 + r, err := git.PlainInit(tmp, false) 23 CheckIfError(err) 24 25 // Load the configuration