<commit_before>package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
	"os/exec"
	"regexp"
	"strconv"
	"strings"
)

// TODO: Split this off into some sort of model package
type Revision string
type RevisionContents struct {
	Revision Revision
	Paths    []string
}

type RevisionMetadata struct {
	Revision    Revision
	Timestamp   int64
	Subject     string
	AuthorName  string
	AuthorEmail string
}

type Alias struct {
	Branch   string
	Revision Revision
}

type Line struct {
	Revision   Revision
	LineNumber int
	Contents   string
}

func (alias Alias) PrintVerbose(w io.Writer) {
	fmt.Fprintf(w, "<p>Branch: \"%s\",\tRevision: \"%s\"\n", alias.Branch, string(alias.Revision))
	fmt.Fprintf(w, "<ul>\n")
	for _, todoLine := range alias.Revision.LoadTodos() {
		fmt.Fprintf(w, "<li>TODO: \"%s\"</li>\n", todoLine.Contents)
	}
	fmt.Fprintf(w, "</ul>\n")
}

func (revision Revision) getSubject() string {
	out, err := exec.Command("git", "show", string(revision), "--format=\"format:%s\"", "-s").Output()
	if err != nil {
		log.Fatal(err)
	}
	return string(out)<commit_msg>Removed the redundant TODO text from the todo list UI<commit_after>package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
	"os/exec"
	"regexp"
	"strconv"
	"strings"
)

// TODO: Split this off into some sort of model package
type Revision string
type RevisionContents struct {
	Revision Revision
	Paths    []string
}

type RevisionMetadata struct {
	Revision    Revision
	Timestamp   int64
	Subject     string
	AuthorName  string
	AuthorEmail string
}

type Alias struct {
	Branch   string
	Revision Revision
}

type Line struct {
	Revision   Revision
	LineNumber int
	Contents   string
}

func (alias Alias) PrintVerbose(w io.Writer) {
	fmt.Fprintf(w, "<p>Branch: \"%s\",\tRevision: \"%s\"\n", alias.Branch, string(alias.Revision))
	fmt.Fprintf(w, "<ul>\n")
	for _, todoLine := range alias.Revision.LoadTodos() {
		fmt.Fprintf(w, "<li>\"%s\"</li>\n", todoLine.Contents)
	}
	fmt.Fprintf(w, "</ul>\n")
}

func (revision Revision) getSubject() string {
	out, err := exec.Command("git", "show", string(revision), "--format=\"format:%s\"", "-s").Output()
	if err != nil {
		log.Fatal(err)
	}
	return string(out)
{'fraction_non_alphanumeric': 0.15289256198347106, 'fraction_numerical': 0.0018365472910927456, 'mean_word_length': 3.941043083900227, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '4457158', 'n_tokens_mistral': 818, 'n_tokens_neox': 792, 'n_words': 209}