Skip to content

Commit 506c8e2

Browse files
committed
fixes staged files length
1 parent d89450a commit 506c8e2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/commit/main.go

+4
Original file line numberDiff line numberDiff line change
@@ -247,5 +247,9 @@ func getStagedFiles() []string {
247247
return []string{}
248248
}
249249

250+
if len(out) == 0 {
251+
return []string{}
252+
}
253+
250254
return strings.Split(string(out), "\n")
251255
}

0 commit comments

Comments
 (0)