<commit_before>package gitconfig

import (
	"fmt"
	"os/exec"
	"strings"
)

func Find(val string) string {
	output, _ := SimpleExec("git", "config", val)
	return output
}

func SetGlobal(key, val string) {
	SimpleExec("git", "config", "--global", "--add", key, val)
}

func UnsetGlobal(key string) {
	SimpleExec("git", "config", "--global", "--unset", key)
}

func List() (string, error) {
	return SimpleExec("git", "config", "-l")
}

func ListFromFile() (string, error) {
	return SimpleExec("git", "config", "-l", "-f", ".gitconfig")
}

func SimpleExec(name string, arg ...string) (string, error) {
	output, err := exec.Command(name, arg...).Output()
	if _, ok := err.(*exec.ExitError); ok {
		return "", nil
	} else if err != nil {
		return fmt.Sprintf("Error running %s %s", name, arg), err<commit_msg>No need to export SimpleExec<commit_after>package gitconfig

import (
	"fmt"
	"os/exec"
	"strings"
)

func Find(val string) string {
	output, _ := simpleExec("git", "config", val)
	return output
}

func SetGlobal(key, val string) {
	simpleExec("git", "config", "--global", "--add", key, val)
}

func UnsetGlobal(key string) {
	simpleExec("git", "config", "--global", "--unset", key)
}

func List() (string, error) {
	return simpleExec("git", "config", "-l")
}

func ListFromFile() (string, error) {
	return simpleExec("git", "config", "-l", "-f", ".gitconfig")
}

func simpleExec(name string, arg ...string) (string, error) {
	output, err := exec.Command(name, arg...).Output()
	if _, ok := err.(*exec.ExitError); ok {
		return "", nil
	} else if err != nil {
		return fmt.Sprintf("Error running %s %s", name, arg), err
{'fraction_non_alphanumeric': 0.20579174368453482, 'fraction_numerical': 0.0, 'mean_word_length': 4.324590163934427, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3673024', 'n_tokens_mistral': 570, 'n_tokens_neox': 565, 'n_words': 165}