play-co / timestep

GNU General Public License v3.0
16 stars 27 forks source link

convert tabs to spaces #86

Closed mgh closed 8 years ago

mgh commented 8 years ago

There won't be a good time to do this, so I think we should just do it now.

For outstanding branches that haven't been merged, these are the steps that should be taken to merge them:

  # switch to your branch
  git checkout [your-branch]

  # update your branch against master right before the tabs->spaces
  # switch, you need to resolve any conflicts here (use
  # `git add [conflict-file]` and `git rebase --continue`)
  git rebase afea7e511c5724fa891c6ac3e49d3db9ede94c12

  # rewrite the history in your branch to have spaces instead of tabs
  git filter-branch --tree-filter 'git diff-tree --name-only --diff-filter=AM -r --no-commit-id $GIT_COMMIT | find . -name '*.js' ! -type d -exec bash -c "expand -t 2 \"\$0\" > /tmp/e && mv /tmp/e \"\$0\"" {} \;' afea7e511c5724fa891c6ac3e49d3db9ede94c12...HEAD

  # rebase against master right after the tabs->spaces switch
  git rebase -s recursive -X theirs 5b388a686b17af3d86cd7edfc3344d9f1b8314ca

  # force-push the update to your branch
  git push -f origin [your-branch]