Skip to content

Error when running with output directory = gitstats source #92

@raoulbhatia

Description

@raoulbhatia

Started with outputpath = local git checkout.

cd Downloads/gitstats-master && ./gitstats /Users/X/git/myrepo .

Error observed:

Refining data...
Saving cache...
Generating report...
Traceback (most recent call last):
  File "./gitstats", line 1490, in <module>
    g.run(sys.argv[1:])
  File "./gitstats", line 1477, in run
    report.create(data, outputpath)
  File "./gitstats", line 744, in create
    shutil.copyfile(src, path + '/' + file)
  File "/usr/local/Cellar/python@2/2.7.15_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
    raise Error("`%s` and `%s` are the same file" % (src, dst))
shutil.Error: `/Users/XYZ/Downloads/gitstats-master/gitstats.css` and `/Users/XYZ/Downloads/gitstats-master/gitstats.css` are the same file

Perhaps it would help to either check on startup (a) if the local directory is the "source" directory, and/or (b) if the resources that gitstats will to deploy already exist? On big Git repositories, this would save the user from re-starting the whole process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions