'log' command crashes program if git isn't configured
Closed this issue · 1 comments
agundy commented
Error Message:
wiki> log
Last 10 commits
Traceback (most recent call last):
File "/usr/local/bin/cmddocs", line 9, in <module>
load_entry_point('cmddocs==0.10.6', 'console_scripts', 'cmddocs')()
File "/usr/local/lib/python2.7/dist-packages/cmddocs/__init__.py", line 249, in main
Cmddocs().cmdloop()
File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
return func(arg)
File "/usr/local/lib/python2.7/dist-packages/cmddocs/__init__.py", line 184, in do_log
show_log(args,self.repo)
File "/usr/local/lib/python2.7/dist-packages/cmddocs/articles.py", line 244, in show_log
print(repo.git.log(pretty=format, n=count,date=dateformat))
File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 440, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 834, in _call_process
return self.execute(make_call(), **_kwargs)
File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 627, in execute
raise GitCommandError(command, status, stderr_value)
git.exc.GitCommandError: 'git log --date=short --pretty=format:%C(blue)%h %Cgreen%C(bold)%ad %Creset%s -n10' returned with exit code 128
stderr: 'fatal: bad default revision 'HEAD''
noqqe commented
yay, thanks!