@@ -3,6 +3,7 @@ package main
3
3
import (
4
4
"bufio"
5
5
"fmt"
6
+ "github.com/remotemobprogramming/mob/v3/say"
6
7
"os"
7
8
"path"
8
9
"regexp"
@@ -24,20 +25,20 @@ func collectCoauthorsFromWipCommits(file *os.File) []Author {
24
25
// For details and background, see https://github.com/remotemobprogramming/mob/issues/81
25
26
26
27
coauthors := parseCoauthors (file )
27
- debugInfo ("Parsed coauthors" )
28
- debugInfo (strings .Join (coauthors , "," ))
28
+ say . Debug ("Parsed coauthors" )
29
+ say . Debug (strings .Join (coauthors , "," ))
29
30
30
31
coauthors = removeElementsContaining (coauthors , gitUserEmail ())
31
- debugInfo ("Parsed coauthors without committer" )
32
- debugInfo (strings .Join (coauthors , "," ))
32
+ say . Debug ("Parsed coauthors without committer" )
33
+ say . Debug (strings .Join (coauthors , "," ))
33
34
34
35
coauthors = removeDuplicateValues (coauthors )
35
- debugInfo ("Unique coauthors without committer" )
36
- debugInfo (strings .Join (coauthors , "," ))
36
+ say . Debug ("Unique coauthors without committer" )
37
+ say . Debug (strings .Join (coauthors , "," ))
37
38
38
39
sortByLength (coauthors )
39
- debugInfo ("Sorted unique coauthors without committer" )
40
- debugInfo (strings .Join (coauthors , "," ))
40
+ say . Debug ("Sorted unique coauthors without committer" )
41
+ say . Debug (strings .Join (coauthors , "," ))
41
42
42
43
return coauthors
43
44
}
@@ -94,11 +95,11 @@ func removeDuplicateValues(slice []string) []string {
94
95
95
96
func appendCoauthorsToSquashMsg (gitDir string ) error {
96
97
squashMsgPath := path .Join (gitDir , "SQUASH_MSG" )
97
- debugInfo ("opening " + squashMsgPath )
98
+ say . Debug ("opening " + squashMsgPath )
98
99
file , err := os .OpenFile (squashMsgPath , os .O_APPEND | os .O_RDWR , 0644 )
99
100
if err != nil {
100
101
if os .IsNotExist (err ) {
101
- debugInfo (squashMsgPath + " does not exist" )
102
+ say . Debug (squashMsgPath + " does not exist" )
102
103
// No wip commits, nothing to squash, this isn't really an error
103
104
return nil
104
105
}
0 commit comments