davidmwine / gitinspector

Automatically exported from code.google.com/p/gitinspector
GNU General Public License v3.0
0 stars 0 forks source link

Add support for bare repositories #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice if gitinspector supported bare git repositories.  Currently it 
just quietly fails without an error message.

At least initially we might constrain how rich the report can be, but 
eventually maybe we could clone the bare repo into a $TEMP location (maybe 
given a branch/tag as well) and run the full reports.

I've attached an initial patch as an RFC to introduce this support.  Probably 
don't want to blindly merge it, but it might open up some discussion.

I'm not a Python expert, so cut me some slack on the syntax.  I am pretty good 
at cut-n-paste, though.  :P

Original issue reported on code.google.com by cringt...@gmail.com on 24 Jul 2013 at 5:44

Attachments:

GoogleCodeExporter commented 9 years ago
Good point. I completely spaced out on this :). With some more tweaks to this 
patch, I think it's possible to get a full report.  When it comes to git blame, 
it is possible to run it on a bare repository with the syntax used by 
gitinspector;

git blame <opts> <rev> -- <file>

Even "git ls-tree" should work (which is also used in the blame module)

To get the absolute root path of a bare git repo you should be able to get it 
with;

git rev-parse --git-dir

It's less reliable than --show-toplevel; but at least it's better than nothing.

/Adam Waldenberg

Original comment by gitinspe...@ejwa.se on 24 Jul 2013 at 7:09

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 2633e04c3a93.

Original comment by gitinspe...@ejwa.se on 3 Aug 2013 at 8:40

GoogleCodeExporter commented 9 years ago
Done. Hopefully this should now work and should generate a full report. At 
least it does in my initial tests. I used your patch as a starting point and 
took the liberty to sign it of for you ;).

Report if you find any problems with this change.

/Adam Waldenberg

Original comment by gitinspe...@ejwa.se on 3 Aug 2013 at 8:45