Skip to content

Commit a3fc503

Browse files
committed
fix: hasChanges function
1 parent a19e51b commit a3fc503

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

internal/git/commit.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,11 @@ func (c *Connection) HasChanges() (bool, error) {
5757
return false, fmt.Errorf("directory is not specified")
5858
}
5959

60-
msg, err := git.Raw("update-index", runGitIn(directory), func(g *types.Cmd) {
60+
git.Raw("update-index", runGitIn(directory), func(g *types.Cmd) {
6161
g.AddOptions("--refresh")
6262
})
63-
if err != nil {
64-
log.Error().Err(err).Str("output", msg).Msg("Failed to refresh index")
65-
return false, err
66-
}
6763

68-
_, err = git.Raw("diff-files", runGitIn(directory), func(g *types.Cmd) {
64+
_, err := git.Raw("diff-files", runGitIn(directory), func(g *types.Cmd) {
6965
g.AddOptions("--quiet")
7066
})
7167
if err != nil {

0 commit comments

Comments
 (0)