<commit_before>package cmd

import (
	"fmt"
	"os"

	"github.com/driusan/go-git/git"
)

func Config(c *git.Client, args []string) {
	if len(args) < 2 {
		fmt.Fprintf(os.Stderr, "Usage: go-git config [<options>]\n")
		return
	}
	var fname string

	if args[0] == "--global" {
		home := os.Getenv("HOME")
		if home == "" {
			home = os.Getenv("home") // On some OSes, it is home
		}
		fname = home + "/.gitconfig"
		args = args[1:]
	} else {
		fname = c.GitDir.String() + "/config"
	}

	file, err := os.OpenFile(fname, os.O_RDWR|os.O_CREATE, 0644)<commit_msg>Fixed stupid bug where Config couldn't be used to retrieve parameters<commit_after>package cmd

import (
	"fmt"
	"os"

	"github.com/driusan/go-git/git"
)

func Config(c *git.Client, args []string) {
	if len(args) < 1 {
		fmt.Fprintf(os.Stderr, "Usage: go-git config [<options>]\n")
		return
	}
	var fname string

	if args[0] == "--global" {
		home := os.Getenv("HOME")
		if home == "" {
			home = os.Getenv("home") // On some OSes, it is home
		}
		fname = home + "/.gitconfig"
		args = args[1:]
	} else {
		fname = c.GitDir.String() + "/config"
	}

	file, err := os.OpenFile(fname, os.O_RDWR|os.O_CREATE, 0644)
{'fraction_non_alphanumeric': 0.1843910806174957, 'fraction_numerical': 0.012006861063464836, 'mean_word_length': 3.2129963898916967, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '5234593', 'n_tokens_mistral': 521, 'n_tokens_neox': 478, 'n_words': 113}