carlhuda/bundler — pull request #1811 by svenfuchs (2012-04-01 18:23:01+00:00)
Title: Make locking the Gemfile optional on $ bundle check

Currently `bundle check` locks the Gemfile. According to @indirect this
behaviour is intentional (see
https://twitter.com/#!/indirect/status/186493694013210624).

I am working on a CLI monitoring tool that makes it easier to work with
cross-repository changes on projects that are split up into several
repositories.

This tool is supposed to display status information such as out-of-date
bundler Gemfiles etc. To do so it watches the filesystem and queries for
information on demand. Using `bundle check` to do so currently leads to
highly confusing side-effects because suddenly the git working directory
might be dirty - having changed the Gemfile.lock - because `bundle
check` has been run in the background.

This patch adds a boolean method option `--[no-]lock` to `bundle check`
that defaults to `true` in order to not change the current behaviour but
make it possible for users to turn it off.

Sidenote: apparently the same behaviour also applies to `bundle show`.
Am I the only one who finds this highly confusing?