-
Notifications
You must be signed in to change notification settings - Fork 6
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
Batali cache: git sources problems building working tree and uncommitted changes #93
Comments
Oddly ran into a similar thing again, in our CI environment:
|
I don't know why the initial checkout of a repo would result in a git index out of sync with master but I've ran into two different scenarios. One were files are reported as deleted, and another where files are modifed. Maybe something as dumb as this would be enough in the right place in: https://github.com/spox/batali/blob/master/lib/batali/git.rb#L19 if repo.status.changed.any?
# whatever 'git checkout -- .' looks like using git gem
end if repo.status.deleted.any?
# whatever 'git reset HEAD' looks like using the git gem
end |
Happening pretty consistently for me in our CI environment, let me know what sort of good debug info I could provide if needed |
Here's a little more strangeness, same basic issue. First the error:
But then if I look at the actual repo in the cache it's fine:
Then if I simply
A bit stumped I guess. |
Best guess at this point from a little testing: git repos where files have been committed with windows line endings are used as git sources in the If there was an option to always clobber the cache, or a --no-cache behavior, it might be enough to workaround it at the cost of being a little slower. |
I forced |
@webframp After some git digging, it looks like this might fix things up:
|
Unfortunately I tried that and still get the issues. Line endings with git are the most annoying cross platform issue. This page has more info too: http://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/ I still either get 'Your local changes to the following files would be overwritten by checkout' error, or I get the following, which seems related but looks like a different error:
I'm probably going to have to stop using a git source to actually get past this which is ok. If I can help debug or step through things better let me know. I'm happy to monkey patch the installed batali with debug code even if you think it will help pinpoint the issue |
@chrisroberts I might have a scenario to recreate this, will contact you on irc to discuss |
Annoyingly, this does seem to be a line ending issue. Add a
|
Filing an issue for tracking this one since it's kind of strange. Using latest code from #92 in an attempt to fix #88
Install fails for what appears to be a dirty git working tree for a git source, but the tree is actually clean.
Scrubbing cache and re-installing results in same error as #88 (which was pre-existing):
The text was updated successfully, but these errors were encountered: