Skip to content

Commit 101792e

Browse files
committed
feat: Add insertion and deletion counts to shortstat parsing
Parses the insertion and deletion counts from the shortstat string output. This information is now available for further processing or display. A TODO comment is added to explore optimizing the regex for parsing. auto-commit-msg{Version:0.4.0-dev Model:gemini-2.5-flash-lite ResponseTime:1.641004209s ExecutionTime:1.648603458s}
1 parent 8e20b55 commit 101792e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

cmd/root.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ var rootCmd = &cobra.Command{
8585
}
8686
shortStatStr := string(shortStat)
8787

88+
// TODO: Get insertions and deletions using a single regex, take into account num of files?
8889
insertionMatches := regexp.MustCompile(`(\d+)\s+insertions?\(\+\)`).FindStringSubmatch(shortStatStr)
8990
insertions := 0
9091
if len(insertionMatches) > 1 {

0 commit comments

Comments
 (0)