tpope/hookup — Issue #5: Suggest Alternate Resolution Strategy
Author: wycats
Created: 2011-12-13 23:27:17+00:00
State: open

I personally use a different resolution strategy for both migrations and bundler.

# Bundler

1. As of sometime in 1.0, it should be fine to always run `bundle install` without running the check first. If the check is required, that's a bug. So if the `Gemfile` changes, it should be equally fast to run `bundle install` again.
2. If there is a conflict in `Gemfile.lock`, I propose the following resolution strategy:
1. `git checkout Gemfile.lock -- `
2. `bundle install`
3. this is because bundler already knows how to resolve conflicts between `Gemfile` and `Gemfile.lock`, and will properly handle all the edge-cases we know about

# Migrations

For similar reasons, I propose the following resolution strategy for conflicts in schema.rb

1. `git checkout db/schema.rb -- `
2. `rake db:migrate`
3. Again, `rake db:migrate` knows how to bring a `schema.rb` up to date with newer migrations

Is there any reason my thinking here is incorrect?