Skip to content

Commit

Permalink
Add test for creating GitAnnotated from FetchHead
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt committed Apr 28, 2017
1 parent d7c00fa commit 9f5b4ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/libgit2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,10 @@ mktempdir() do dir
@test isfile(joinpath(test_repo, test_file))
@test new_head == head_oid

# GitAnnotated for a fetchhead
fh_ann = LibGit2.GitAnnotated(repo, LibGit2.Consts.FETCH_HEAD)
@test LibGit2.GitHash(fh_ann) == head_oid

# Detach HEAD - no merge
LibGit2.checkout!(repo, string(commit_oid3))
@test_throws LibGit2.Error.GitError LibGit2.merge!(repo, fastforward=true)
Expand Down

0 comments on commit 9f5b4ad

Please sign in to comment.