gitstats icon indicating copy to clipboard operation
gitstats copied to clipboard

Error when running with output directory = gitstats source

Open raoulbhatia opened this issue 5 years ago • 2 comments

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.

raoulbhatia avatar Mar 05 '19 10:03 raoulbhatia

I am also facing the same issue , any solution ?

Bala2103 avatar Jul 30 '19 08:07 Bala2103

https://github.com/vifactor/repostat

sebix avatar Aug 06 '19 19:08 sebix