File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -1726,6 +1726,19 @@ mktempdir() do dir
1726
1726
end
1727
1727
end
1728
1728
1729
+ @testset " checkout_head" begin
1730
+ LibGit2. with (LibGit2. GitRepo (cache_repo)) do repo
1731
+ # modify file
1732
+ repo_file = open (joinpath (cache_repo,test_file), " a" )
1733
+ println (repo_file, commit_msg1 * randstring (10 ))
1734
+ close (repo_file)
1735
+ # and checkout HEAD once more
1736
+ LibGit2. checkout_head (repo, options= LibGit2. CheckoutOptions (checkout_strategy= LibGit2. Consts. CHECKOUT_FORCE))
1737
+ @test LibGit2. headname (repo) == master_branch
1738
+ @test ! LibGit2. isdirty (repo)
1739
+ end
1740
+ end
1741
+
1729
1742
@testset " checkout/headname" begin
1730
1743
LibGit2. with (LibGit2. GitRepo (cache_repo)) do repo
1731
1744
LibGit2. checkout! (repo, string (commit_oid1))
@@ -1734,7 +1747,6 @@ mktempdir() do dir
1734
1747
end
1735
1748
end
1736
1749
1737
-
1738
1750
if Sys. isunix ()
1739
1751
@testset " checkout/proptest" begin
1740
1752
LibGit2. with (LibGit2. GitRepo (test_repo)) do repo
You can’t perform that action at this time.
0 commit comments