diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:43:48 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 15:11:06 +1000 |
commit | 4fb52ce2abcd9cfbd566188a20c8919e27dafebb (patch) | |
tree | 86442dcd83cf4e11fe664c1b216ef1e133b48776 /pkg/commands | |
parent | 2915134007be939bd43fae74cb7559b4cfdccc9d (diff) |
better handling of there being no commit files
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/git.go | 3 |
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 |