Skip to content

Commit 21cc4aa

Browse files
committed
improvements
1 parent dda296a commit 21cc4aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/gitrepo/merge.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func MergeBase(ctx context.Context, repo Repository, commit1, commit2 string) (s
1919
AddDynamicArguments(commit1, commit2).
2020
RunStdString(ctx, &gitcmd.RunOpts{Dir: repoPath(repo)})
2121
if err != nil {
22-
return "", fmt.Errorf("unable to get merge-base of %s and %s: %w", commit1, commit2, err)
22+
return "", fmt.Errorf("get merge-base of %s and %s failed: %w", commit1, commit2, err)
2323
}
2424
return strings.TrimSpace(mergeBase), nil
2525
}
@@ -37,8 +37,8 @@ func MergeTree(ctx context.Context, repo Repository, base, ours, theirs string)
3737
Stdout: stdout,
3838
})
3939
if gitErr != nil && !gitcmd.IsErrorExitCode(gitErr, 1) {
40-
log.Error("Unable to run merge-tree: %v", gitErr)
41-
return "", false, nil, fmt.Errorf("unable to run merge-tree: %w", gitErr)
40+
log.Error("run merge-tree failed: %v", gitErr)
41+
return "", false, nil, fmt.Errorf("run merge-tree failed: %w", gitErr)
4242
}
4343

4444
// There are two situations that we consider for the output:
@@ -49,6 +49,6 @@ func MergeTree(ctx context.Context, repo Repository, base, ours, theirs string)
4949
return treeOID, gitcmd.IsErrorExitCode(gitErr, 1), nil, nil
5050
}
5151

52-
// Remove last NULL-byte from conflicted file info, then split with NULL byte as seperator.
52+
// Remove last NULL-byte from conflicted file info, then split with NULL byte as separator.
5353
return treeOID, true, strings.Split(conflictedFileInfo[:len(conflictedFileInfo)-1], "\x00"), nil
5454
}

0 commit comments

Comments
 (0)