Skip to content

Allow fetch operation to receive a ref param #362

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

Merged
merged 8 commits into from
Jun 25, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update for comments
  • Loading branch information
Joshua Liebowitz committed Jun 19, 2018
commit c413f2125ad7641bdee34a3c06162c78bae9d18e
12 changes: 6 additions & 6 deletions tests/units/test_remotes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,20 @@ def test_fetch_ref_adds_ref_option
new_file('test-file1', 'gonnaCommitYou')
loc.add
loc.commit('master commit 1')
first_commit = loc.log.first.sha
first_commit_sha = loc.log.first.sha

new_file('test-file2', 'gonnaCommitYouToo')
loc.add
loc.commit('master commit 2')
second_commit = loc.log.first.sha
second_commit_sha = loc.log.first.sha

# Make sure fetch message only has the first commit when we fetch the first commit
assert(loc.fetch('origin', {:ref => first_commit}).include?(first_commit))
assert(!loc.fetch('origin', {:ref => first_commit}).include?(second_commit))
assert(loc.fetch('origin', {:ref => first_commit_sha}).include?(first_commit_sha))
assert(!loc.fetch('origin', {:ref => first_commit_sha}).include?(second_commit_sha))

# Make sure fetch message only has the second commit when we fetch the second commit
assert(loc.fetch('origin', {:ref => second_commit}).include?(second_commit))
assert(!loc.fetch('origin', {:ref => second_commit}).include?(first_commit))
assert(loc.fetch('origin', {:ref => second_commit_sha}).include?(second_commit_sha))
assert(!loc.fetch('origin', {:ref => second_commit_sha}).include?(first_commit_sha))
end
end
end
Expand Down