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

Test some libgit2 warnings #21566

Merged
merged 1 commit into from
Apr 27, 2017
Merged
Changes from all commits
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
8 changes: 4 additions & 4 deletions test/libgit2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -729,9 +729,9 @@ mktempdir() do dir
head_ann = LibGit2.GitAnnotated(repo, "master")

# (fail to) merge them because we can't fastforward
@test !LibGit2.merge!(repo, [upst_ann], true)
@test_warn "WARNING: Cannot perform fast-forward merge." !LibGit2.merge!(repo, [upst_ann], true)
# merge them now that we allow non-ff
@test LibGit2.merge!(repo, [upst_ann], false)
@test_warn "INFO: Review and commit merged changes." LibGit2.merge!(repo, [upst_ann], false)
@test LibGit2.is_ancestor_of(string(oldhead), string(LibGit2.head_oid(repo)), repo)

# go back to merge_a and rename a file
Expand All @@ -744,7 +744,7 @@ mktempdir() do dir
rename_flag = 0
rename_flag = LibGit2.toggle(rename_flag, 0) # turns on the find renames opt
mos = LibGit2.MergeOptions(flags=rename_flag)
@test LibGit2.merge!(repo, [upst_ann], merge_opts=mos)
@test_warn "INFO: Review and commit merged changes." LibGit2.merge!(repo, [upst_ann], merge_opts=mos)
finally
close(repo)
end
Expand Down Expand Up @@ -1053,7 +1053,7 @@ mktempdir() do dir
LibGit2.commit(repo, "add merge_file1")
LibGit2.branch!(repo, "master")
a_head_ann = LibGit2.GitAnnotated(repo, "branch/merge_a")
@test LibGit2.merge!(repo, [a_head_ann]) #merge returns true if successful
@test_warn "INFO: Review and commit merged changes." LibGit2.merge!(repo, [a_head_ann]) #merge returns true if successful
finally
close(repo)
end
Expand Down