@@ -174,17 +174,9 @@ func (repo *Repository) GetDiffNumChangedFiles(base, head string, directComparis
174174 return w .numLines , nil
175175}
176176
177- // GetDiffShortStat counts number of changed files, number of additions and deletions
178- func (repo * Repository ) GetDiffShortStat (base , head string ) (numFiles , totalAdditions , totalDeletions int , err error ) {
179- numFiles , totalAdditions , totalDeletions , err = GetDiffShortStat (repo .Ctx , repo .Path , nil , base + "..." + head )
180- if err != nil && strings .Contains (err .Error (), "no merge base" ) {
181- return GetDiffShortStat (repo .Ctx , repo .Path , nil , base , head )
182- }
183- return numFiles , totalAdditions , totalDeletions , err
184- }
185-
186- // GetDiffShortStat counts number of changed files, number of additions and deletions
187- func GetDiffShortStat (ctx context.Context , repoPath string , trustedArgs TrustedCmdArgs , dynamicArgs ... string ) (numFiles , totalAdditions , totalDeletions int , err error ) {
177+ // GetDiffShortStatByCmdArgs counts number of changed files, number of additions and deletions
178+ // TODO: it can be merged with another "GetDiffShortStat" in the future
179+ func GetDiffShortStatByCmdArgs (ctx context.Context , repoPath string , trustedArgs TrustedCmdArgs , dynamicArgs ... string ) (numFiles , totalAdditions , totalDeletions int , err error ) {
188180 // Now if we call:
189181 // $ git diff --shortstat 1ebb35b98889ff77299f24d82da426b434b0cca0...788b8b1440462d477f45b0088875
190182 // we get:
0 commit comments