Skip to content
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

Merge rbenv to have a common ancestor for future merges #360

Merged
merged 461 commits into from Apr 19, 2015
Merged

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Apr 15, 2015

This merges
https://github.com/sstephenson/rbenv/commits/4d72eefffc548081f6eee2e54d3b9116b9f9ee8e
to build a common ancestor for future merges.

This is branched off f48a5b1, which was
the last manual merge.

Discussion / initial idea: #286 (comment)

This was done using:

# Keep our changes for "unmerged, both added"
for i in $(git status --porcelain | grep '^AA ' | cut -d\  -f2); do
  git checkout --ours $i
  git add $i
done

# "git mv" rbenv files to our name, keeping the current contents.
for i in $(git status --porcelain | grep '^A ' | sed 's/^A  //'); do
  ours=${i//rbenv/pyenv}
  test -f $ours || { echo "Skipping: $i"; continue; }
  git mv -f $i $ours
  git reset HEAD $ours
done

I've handled the following then manually:

- rbenv.d/exec/gem-rehash.bash
- rbenv.d/exec/gem-rehash/rubygems_plugin.rb

This should allow to merge rbenv in the future using:

git merge rbenv/master -s recursive -X rename-threshold=5%

I am not sure about the rename-threshold, 25% also worked for one file
I've tested.

Conflicts:
.gitignore
.travis.yml
LICENSE
README.md
src/Makefile.in
test/--version.bats
test/commands.bats
test/completions.bats
test/exec.bats
test/global.bats
test/help.bats
test/hooks.bats
test/init.bats
test/local.bats
test/prefix.bats
test/rehash.bats
test/run
test/shell.bats
test/shims.bats
test/test_helper.bash
test/version-file-read.bats
test/version-file-write.bats
test/version-file.bats
test/version-name.bats
test/version-origin.bats
test/version.bats
test/versions.bats
test/whence.bats
test/which.bats

sstephenson and others added 30 commits December 24, 2011 15:16
…active_shells

Only run compctl if it's an interactive shell
rbenv-init arguments should be allowed in any order
This will help with the packaging of rbenv plugin that contain hooks in
Debian.
Add /usr/lib/rbenv/hooks to hook search path
Prevent $command from leaking outside of function
help for versions and commands, including their options
remove "+=" operator in rbenv-rehash to support bash-3.0
Not a big change, just thought it's always good to make it easier for a beginner
mislav and others added 23 commits October 15, 2014 05:46
It doesn't need to be a bash array and we don't need a separate index of
shims registered. Simply keep everything in a space-separated string and
use that as an index as well.

This assumes that executable names *never* have spaces in them.
Speed up rbenv by dynamically loading compiled command
This allows rbenv source code to ship with built-in hooks.
This bakes in the functionality of rbenv-gem-rehash plugin.

The Rubygems hook is improved:

- It will not rehash for gems installed in locations that rbenv otherwise
  doesn't search for binstubs; for instance in case of
  `bundle --path vendor/bundle`.
- It rescues exceptions and makes them non-lethal by warning on stderr.
Bring rbenv-gem-rehash functionality to core
As it seems, JRuby 1.7 complains on stderr every time you invoke `system`:

    warning: executable? does not in this environment and will return a dummy value

It doesn't seem to complain when backtics are used. It's safe to use
backticks here because `rbenv rehash` doesn't output anything on stdout,
and the exit status of the command is irrelevant.
When we started to support reading `.ruby-version` files, we made a
commitment to not support fuzzy version matching. Treating "ruby-2.1.5"
as "2.1.5" is a sort of fuzzy matching, so we put in place a warning
telling you to remove the extraneous "ruby-" prefix popularly used by
other Ruby version managers to denote MRI. (Their logic is that MRI is
"ruby" and other rubies are not "ruby", apparently.)

However, people are often not able to remove the prefix in their
projects because they want to support other coworkers and tools that
sadly still require the prefix, like RubyMine.

So to restore sanity for a big portion of our users, the warning is gone.
We won't maintain it anymore. Instead, the changelogs can be obtained
from the project's Releases page: https://github.com/sstephenson/rbenv/releases
The license information is already present in the LICENSE file.
[README] Updated link to bundler.io
…s` output

The `rbenv versions` info highlights 1.9.3-p327 as the current version, and
making `rbenv version` sample output match that helps make it clearer.
Update README to make rbenv version consistent with previous `versions` output
Remove warning about extraneous "ruby-" prefix in `.ruby-version`
Remove history, license information from README
Remove dead links to History and License from README
This merges
https://github.com/sstephenson/rbenv/commits/4d72eefffc548081f6eee2e54d3b9116b9f9ee8e
to build a common ancestor for future merges.

This is branched off f48a5b1, which was
the last manual merge.

Discussion / initial idea: #286 (comment)

This was done using:

    # Keep our changes for "unmerged, both added"
    for i in $(git status --porcelain | grep '^AA ' | cut -d\  -f2); do
      git checkout --ours $i
      git add $i
    done

    # "git mv" rbenv files to our name, keeping the current contents.
    for i in $(git status --porcelain | grep '^A ' | sed 's/^A  //'); do
      ours=${i//rbenv/pyenv}
      test -f $ours || { echo "Skipping: $i"; continue; }
      git mv -f $i $ours
      git reset HEAD $ours
    done

I've handled the following then manually:

    - rbenv.d/exec/gem-rehash.bash
    - rbenv.d/exec/gem-rehash/rubygems_plugin.rb

This should allow to merge rbenv in the future using:

    git merge rbenv/master -s recursive -X rename-threshold=5%

I am not sure about the rename-threshold, 25% also worked for one file
I've tested.

Conflicts:
	.gitignore
	.travis.yml
	LICENSE
	README.md
	src/Makefile.in
	test/--version.bats
	test/commands.bats
	test/completions.bats
	test/exec.bats
	test/global.bats
	test/help.bats
	test/hooks.bats
	test/init.bats
	test/local.bats
	test/prefix.bats
	test/rehash.bats
	test/run
	test/shell.bats
	test/shims.bats
	test/test_helper.bash
	test/version-file-read.bats
	test/version-file-write.bats
	test/version-file.bats
	test/version-name.bats
	test/version-origin.bats
	test/version.bats
	test/versions.bats
	test/whence.bats
	test/which.bats
@yyuu
Copy link
Contributor

yyuu commented Apr 15, 2015

😵

Anyway I'll try to check this out. Gimme some more time....

@blueyed blueyed mentioned this pull request Apr 15, 2015
@blueyed
Copy link
Contributor Author

blueyed commented Apr 15, 2015

Sure.

The changes are easy to review (there are none).. ;)

You could experiment with this trying to merge the latest changes from rbenv etc.

git fetch origin
git checkout -b merge-rbenv origin/merge-rbenv
git remote add rbenv git://github.com/sstephenson/rbenv.git
git merge --no-commit rbenv/master

This will currently result in a conflict for README.md, mainly because there is a new section about environment variables, which should be adopted.

As suggested in #286 (comment) that would be a good time to install/enable git-rerere now, too.. :)

yyuu added a commit that referenced this pull request Apr 19, 2015
Merge rbenv to have a common ancestor for future merges
@yyuu yyuu merged commit be03793 into master Apr 19, 2015
@yyuu yyuu deleted the merge-rbenv branch April 19, 2015 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet