Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for bare repositories #14

Closed
GoogleCodeExporter opened this issue Aug 23, 2015 · 3 comments
Closed

Add support for bare repositories #14

GoogleCodeExporter opened this issue Aug 23, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 24 Jul 2013 at 5:44

Attachments:

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 24 Jul 2013 at 7:09

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision 2633e04c3a93.

Original comment by [email protected] on 3 Aug 2013 at 8:40

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 3 Aug 2013 at 8:45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants