When returned git status is an empty list, popping it will raise an IndexError exception as follows.
So add sanity checking to status before parsing branch status.
2019-12-19 10:38:19,910:ERROR:shell:gitstatus:Exception while computing segment: pop from empty list
Traceback (most recent call last):
File "/home/taoyl/powerline/powerline/segment.py", line 173, in process_segment
contents = segment['contents_func'](pl, segment_info)
File "/home/taoyl/powerline/powerline/segment.py", line 412, in <lambda>
contents_func = lambda pl, segment_info: _contents_func(pl=pl, segment_info=segment_info, **args)
File "/home/taoyl/powerline/powerline/segments/powerline_gitstatus/segments.py", line 132, in __call__
branch, detached, behind, ahead = self.parse_branch(status.pop(0))
IndexError: pop from empty list
When returned git status is an empty list, popping it will raise an IndexError exception as follows. So add sanity checking to status before parsing branch status.