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

git caching fails if .git directory exists in working directory #121

Closed
mikeclarke opened this issue Mar 29, 2014 · 3 comments
Closed

git caching fails if .git directory exists in working directory #121

mikeclarke opened this issue Mar 29, 2014 · 3 comments
Assignees
Labels
Type: Bug Does not work as expected.

Comments

@mikeclarke
Copy link

I ran into this upgrading to 3.0, so maybe others will hit it as well. One of my software definitions was failing on the "caching build" step:

---- Begin output of git --git-dir=/var/cache/omnibus/cache/install_path/opt/st --work-tree=/opt/st add -A -f ----
STDOUT:
STDERR: fatal: Not a git repository: embedded/lib/python2.7/site-packages/sentry/static/sentry/bootstrap/../../../../../.git/modules/src/sentry/static/sentry/bootstrap
---- End output of git --git-dir=/var/cache/omnibus/cache/install_path/opt/st --work-tree=/opt/st add -A -f ----
Ran git --git-dir=/var/cache/omnibus/cache/install_path/opt/st --work-tree=/opt/st add -A -f returned 128

Gist: https://gist.github.com/mikeclarke/9844487

The sledgehammer solution is to rm -rf the .git directory, but it might be better to throw a warning or something to make it obvious. The relative path stuff in particular might be confusing to users who hit this. There might be another argument to force adding the paths anyways, which would also solve this, but I'm not sure if something like that exists.

git version is 1.8.2.1

@sethvargo sethvargo added the Bug label Mar 29, 2014
@sethvargo
Copy link
Contributor

@mikeclarke this is definitely a bug. I have created #126 to track the relative path issues.

Could you give us a public software definition for this? We need a test case. We need to explore a few options to fix this. @adamhjk might have an opinion on a good solution.

@mikeclarke
Copy link
Author

Sure thing - I'm not sure it's worthy of a pull request on omnibus-software, so I'll share the gist:
https://gist.github.com/mikeclarke/9901233

I'm using pip 1.5.4 instead of 1.3 that is the default, but that shouldn't matter for reproducing the git error.

@sethvargo
Copy link
Contributor

Fixed in #171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

4 participants