error when enabling on empty repo

Issue #2 resolved
Ali Vakilzade created an issue
$ git init
$ gitodo --enable

gitodo is not enabled in this repository
trying to enable gitodo for your repository ... 
fatal: Not a valid object name HEAD
Traceback (most recent call last):
  File "bin/gitodo", line 58, in <module>
    main()
  File "bin/gitodo", line 34, in main
    gittodo_core.enable()
  File "gitodo/core.py", line 89, in enable
    self.scanFiles()
  File "gitodo/core.py", line 40, in scanFiles
    for file_name in self.getTrackedFiles(changed_only=changed_only):
  File "gitodo/core.py", line 136, in getTrackedFiles
    results = subprocess.check_output(cmd, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 575, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'git ls-tree --name-only -r HEAD' returned non-zero exit status 128

Comments (2)

  1. Log in to comment