Skip to content

Instantly share code, notes, and snippets.

@atz
Last active May 17, 2016 02:18
Show Gist options
  • Save atz/50c4266491ed0a9ecdbf8865a9ad0b23 to your computer and use it in GitHub Desktop.
Save atz/50c4266491ed0a9ecdbf8865a9ad0b23 to your computer and use it in GitHub Desktop.
local bundler alias messing w/ my files...
m2dl-atz-01-mbpx:hybox atz$ git checkout -- Gemfile.lock
m2dl-atz-01-mbpx:hybox atz$ git st
On branch master
Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
m2dl-atz-01-mbpx:hybox atz$ git st
On branch master
Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: Gemfile.lock
no changes added to commit (use "git add" and/or "git commit -a")
m2dl-atz-01-mbpx:hybox atz$ bundle config
Settings are listed in order of priority. The top value will be used.
local.sufia
Set for the current user (/Users/atz/.bundle/config): "/Users/atz/repos/sufia"
orig_path
Set via BUNDLE_ORIG_PATH: "/Users/atz/.rvm/gems/ruby-2.2.5/bin:/Users/atz/.rvm/gems/ruby-2.2.5@global/bin:/Users/atz/.rvm/rubies/ruby-2.2.5/bin:/Users/atz/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
orig_gem_path
Set via BUNDLE_ORIG_GEM_PATH: "/Users/atz/.rvm/gems/ruby-2.2.5:/Users/atz/.rvm/gems/ruby-2.2.5@global"
@atz
Copy link
Author

atz commented May 17, 2016

git checkout -- Gemfile.lock && git status && sleep 1 && git status ==> both statuses clean
git checkout -- Gemfile.lock && git status && sleep 2 && git status ==> 2nd status dirty: Gemfile.lock has changes! Specifically the revision hash for my local.sufia current working dir.

What the heck is going on? How is some bundler-specific process getting forked off and editing my lock file more than a second after totally unrelated git commands?

This happened deterministically for 10 or 15 minutes. Then, stopped. Without any changes to environment, it started behaving again: Gemfile.lock stopped acquiring phantom edits. So bizarre.

If you can't count on the contents of a file you check out from git, because some rando process has decided to edit it for you, that process is evil and must be destroyed.

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