summaryrefslogtreecommitdiffstats
path: root/pkg/commands
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-23 14:43:48 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-23 15:11:06 +1000
commit4fb52ce2abcd9cfbd566188a20c8919e27dafebb (patch)
tree86442dcd83cf4e11fe664c1b216ef1e133b48776 /pkg/commands
parent2915134007be939bd43fae74cb7559b4cfdccc9d (diff)
better handling of there being no commit files
Diffstat (limited to 'pkg/commands')
-rw-r--r--pkg/commands/git.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go
index 36c90228f..51e277835 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -1066,6 +1066,9 @@ func (c *GitCommand) GetCommitFilesFromFilenames(filenames string, parent string
for _, line := range strings.Split(strings.TrimRight(filenames, "\n"), "\n") {
// typical result looks like 'A my_file' meaning my_file was added
+ if line == "" {
+ continue
+ }
changeStatus := line[0:1]
name := line[2:]
status := patch.UNSELECTED