Running 'add-force.R' [0s/1s]
  Running 'bare_repository.R' [0s/1s]
  Running 'blame.R' [0s/1s]
  Running 'blob.R' [0s/1s]
  Running 'branch.R' [0s/1s]
  Running 'bundle.R' [0s/1s]
  Running 'checkout-named-branch.R' [0s/1s]
  Running 'checkout.R' [0s/1s]
  Running 'checkout_branch.R' [0s/1s]
  Running 'checkout_commit.R' [0s/1s]
  Running 'checkout_tag.R' [0s/1s]
  Running 'clone_bare.R' [0s/1s]
  Running 'clone_branch.R' [0s/1s]
  Running 'clone_checkout.R' [0s/1s]
  Running 'commit.R' [1s/1s]
  Running 'commits_path.R' [1s/7s]
  Running 'config.R' [0s/1s]
  Running 'diff.R' [0s/1s]
  Running 'fast_forward_merge.R' [0s/1s]
  Running 'fetch.R' [0s/1s]
  Running 'graph.R' [0s/1s]
  Running 'index.R' [0s/1s]
  Running 'invalid-conf-var.R' [0s/1s]
  Running 'libgit2.R' [0s/1s]
  Running 'ls_tree.R' [0s/1s]
  Running 'merge.R' [0s/1s]
  Running 'merge_named_branch.R' [0s/1s]
  Running 'normal_merge.R' [0s/1s]
  Running 'note.R' [0s/1s]
  Running 'odb_blobs.R' [0s/1s]
  Running 'pre-process-path.R' [0s/1s]
  Running 'pull.R' [0s/0s]
  Running 'push-force.R' [0s/1s]
  Running 'push.R' [0s/1s]
  Running 'reference.R' [0s/1s]
  Running 'reflog.R' [0s/0s]
  Running 'refspec.R' [0s/1s]
  Running 'remotes.R' [0s/1s]
  Running 'remove.R' [0s/1s]
  Running 'repository.R' [0s/1s]
  Running 'reset.R' [0s/1s]
  Running 'revparse.R' [0s/1s]
  Running 'signature.R' [0s/1s]
  Running 'stash.R' [0s/1s]
  Running 'status.R' [0s/1s]
  Running 'tag.R' [0s/1s]
  Running 'time.R' [0s/1s]
  Running 'tree.R' [0s/1s]
  Running 'when.R' [0s/1s]
Running the tests in 'tests/checkout-named-branch.R' failed.
Complete output:
  > ## git2r, R bindings to the libgit2 library.
  > ## Copyright (C) 2013-2019 The git2r contributors
  > ##
  > ## This program is free software; you can redistribute it and/or modify
  > ## it under the terms of the GNU General Public License, version 2,
  > ## as published by the Free Software Foundation.
  > ##
  > ## git2r is distributed in the hope that it will be useful,
  > ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  > ## GNU General Public License for more details.
  > ##
  > ## You should have received a copy of the GNU General Public License along
  > ## with this program; if not, write to the Free Software Foundation, Inc.,
  > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  > 
  > library("git2r")
  > 
  > ## For debugging
  > sessionInfo()
  R Under development (unstable) (2020-12-21 r79668)
  Platform: x86_64-pc-linux-gnu (64-bit)
  Running under: Debian GNU/Linux bullseye/sid
  
  Matrix products: default
  BLAS:   /home/hornik/tmp/R.check/r-devel-clang/Work/build/lib/libRblas.so
  LAPACK: /home/hornik/tmp/R.check/r-devel-clang/Work/build/lib/libRlapack.so
  
  locale:
   [1] LC_CTYPE=en_US.iso885915       LC_NUMERIC=C                  
   [3] LC_TIME=en_US.iso885915        LC_COLLATE=C                  
   [5] LC_MONETARY=en_US.iso885915    LC_MESSAGES=en_US.iso885915   
   [7] LC_PAPER=en_US.iso885915       LC_NAME=C                     
   [9] LC_ADDRESS=C                   LC_TELEPHONE=C                
  [11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C           
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
  [1] git2r_0.27.1
  
  loaded via a namespace (and not attached):
  [1] compiler_4.1.0
  > 
  > ## Create directories for repositories in tempdir
  > path_bare <- tempfile(pattern = "git2r-")
  > path_repo_1 <- tempfile(pattern = "git2r-")
  > path_repo_2 <- tempfile(pattern = "git2r-")
  > 
  > dir.create(path_bare)
  > dir.create(path_repo_1)
  > dir.create(path_repo_2)
  > 
  > ## Create bare repository
  > bare_repo <- init(path_bare, bare = TRUE)
  > 
  > ## Clone to repo 1
  > repo_1 <- clone(path_bare, path_repo_1)
  cloning into '/tmp/RtmphUAbju/git2r-13cd5df5468c'...
  > config(repo_1, user.name = "Alice", user.email = "alice@example.org")
  > 
  > ## Add changes to repo 1 and push to bare
  > writeLines(
  +     "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do",
  +     con = file.path(path_repo_1, "test.txt"))
  > add(repo_1, "test.txt")
  > commit(repo_1, "First commit message")
  [614781e] 2020-12-23: First commit message
  > push(repo_1, "origin", "refs/heads/master")
  > 
  > ## Test checkout branch argument
  > tools::assertError(checkout(repo_1))
  > tools::assertError(checkout(repo_1, c("master", "master")))
  > tools::assertError(checkout(repo_1, "dev"))
  > 
  > ## Create and checkout dev branch in repo 1
  > checkout(repo_1, "dev", create = TRUE)
  > 
  > ## Add changes to dev branch in repo 1 and push to bare
  > writeLines(
  +     c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do",
  +       "eiusmod tempor incididunt ut labore et dolore magna aliqua."),
  +     con = file.path(path_repo_1, "test.txt"))
  > add(repo_1, "test.txt")
  > commit(repo_1, "Second commit message")
  [58e6145] 2020-12-23: Second commit message
  > push(repo_1, "origin", "refs/heads/dev")
  > 
  > ## Clone to repo 2
  > repo_2 <- clone(path_bare, path_repo_2)
  cloning into '/tmp/RtmphUAbju/git2r-13cd8cfa7d0'...
  > config(repo_2, user.name = "Bob", user.email = "bob@example.org")
  > 
  > stopifnot(identical(
  +     "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do",
  +     readLines(file.path(path_repo_2, "test.txt"))))
  > 
  > ## Checkout dev branch
  > checkout(repo_2, "dev")
  > 
  > ## Check content of file
  > stopifnot(identical(
  +     c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do",
  +       "eiusmod tempor incididunt ut labore et dolore magna aliqua."),
  +     readLines(file.path(path_repo_2, "test.txt"))))
  > 
  > ## Checkout previous branch
  > checkout(repo_2, "-")
  Error in vapply(branch, Negate(is.na), logical(1)) : 
    values must be length 1,
   but FUN(X[[3]]) result is length 0
  Calls: checkout -> previous_branch_name -> vapply
  Execution halted
Running the tests in 'tests/diff.R' failed.
Complete output:
  > ## git2r, R bindings to the libgit2 library.
  > ## Copyright (C) 2013-2019 The git2r contributors
  > ##
  > ## This program is free software; you can redistribute it and/or modify
  > ## it under the terms of the GNU General Public License, version 2,
  > ## as published by the Free Software Foundation.
  > ##
  > ## git2r is distributed in the hope that it will be useful,
  > ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  > ## GNU General Public License for more details.
  > ##
  > ## You should have received a copy of the GNU General Public License along
  > ## with this program; if not, write to the Free Software Foundation, Inc.,
  > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  > 
  > library("git2r")
  > 
  > ## For debugging
  > sessionInfo()
  R Under development (unstable) (2020-12-21 r79668)
  Platform: x86_64-pc-linux-gnu (64-bit)
  Running under: Debian GNU/Linux bullseye/sid
  
  Matrix products: default
  BLAS:   /home/hornik/tmp/R.check/r-devel-clang/Work/build/lib/libRblas.so
  LAPACK: /home/hornik/tmp/R.check/r-devel-clang/Work/build/lib/libRlapack.so
  
  locale:
   [1] LC_CTYPE=en_US.iso885915       LC_NUMERIC=C                  
   [3] LC_TIME=en_US.iso885915        LC_COLLATE=C                  
   [5] LC_MONETARY=en_US.iso885915    LC_MESSAGES=en_US.iso885915   
   [7] LC_PAPER=en_US.iso885915       LC_NAME=C                     
   [9] LC_ADDRESS=C                   LC_TELEPHONE=C                
  [11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C           
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
  [1] git2r_0.27.1
  
  loaded via a namespace (and not attached):
  [1] compiler_4.1.0
  > 
  > ## Create a directory in tempdir
  > path <- tempfile(pattern = "git2r-")
  > dir.create(path)
  > 
  > ## Initialize a repository
  > repo <- init(path)
  > config(repo, user.name = "Alice", user.email = "alice@example.org")
  > 
  > ## Create a file, add, commit
  > writeLines("Hello world!", file.path(path, "test.txt"))
  > add(repo, "test.txt")
  > commit(repo, "Commit message")
  [a55dc68] 2020-12-23: Commit message
  > 
  > ## Change the file, diff between index and workdir
  > writeLines("Hello again!\nHere is a second line\nAnd a third",
  +            file.path(path, "test.txt"))
  > diff_1 <- diff(repo)
  > diff(repo, as_char = TRUE)
  [1] "diff --git a/test.txt b/test.txt\nindex cd08755..cf48daf 100644\n--- a/test.txt\n+++ b/test.txt\n@@ -1 +1,3 @@\n-Hello world!\n+Hello again!\n+Here is a second line\n+And a third\n"
  > diff(repo, as_char = TRUE, filename = file.path(path, "test.diff"))
  Error in diff.git_repository(repo, as_char = TRUE, filename = file.path(path,  : 
    Error in 'git2r_diff_index_to_wd': could not write status: 
  Calls: diff -> diff.git_repository
  Execution halted
Running the tests in 'tests/pull.R' failed.
Complete output:
  > ## git2r, R bindings to the libgit2 library.
  > ## Copyright (C) 2013-2019 The git2r contributors
  > ##
  > ## This program is free software; you can redistribute it and/or modify
  > ## it under the terms of the GNU General Public License, version 2,
  > ## as published by the Free Software Foundation.
  > ##
  > ## git2r is distributed in the hope that it will be useful,
  > ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  > ## GNU General Public License for more details.
  > ##
  > ## You should have received a copy of the GNU General Public License along
  > ## with this program; if not, write to the Free Software Foundation, Inc.,
  > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  > 
  > library("git2r")
  > 
  > ## For debugging
  > sessionInfo()
  R Under development (unstable) (2020-12-21 r79668)
  Platform: x86_64-pc-linux-gnu (64-bit)
  Running under: Debian GNU/Linux bullseye/sid
  
  Matrix products: default
  BLAS:   /home/hornik/tmp/R.check/r-devel-clang/Work/build/lib/libRblas.so
  LAPACK: /home/hornik/tmp/R.check/r-devel-clang/Work/build/lib/libRlapack.so
  
  locale:
   [1] LC_CTYPE=en_US.iso885915       LC_NUMERIC=C                  
   [3] LC_TIME=en_US.iso885915        LC_COLLATE=C                  
   [5] LC_MONETARY=en_US.iso885915    LC_MESSAGES=en_US.iso885915   
   [7] LC_PAPER=en_US.iso885915       LC_NAME=C                     
   [9] LC_ADDRESS=C                   LC_TELEPHONE=C                
  [11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C           
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
  [1] git2r_0.27.1
  
  loaded via a namespace (and not attached):
  [1] compiler_4.1.0
  > 
  > ## Create directories for repositories in tempdir
  > path_bare <- tempfile(pattern = "git2r-")
  > path_repo_1 <- tempfile(pattern = "git2r-")
  > path_repo_2 <- tempfile(pattern = "git2r-")
  > 
  > dir.create(path_bare)
  > dir.create(path_repo_1)
  > dir.create(path_repo_2)
  > 
  > ## Create bare repository
  > bare_repo <- init(path_bare, bare = TRUE)
  > 
  > ## Clone to repo 1
  > repo_1 <- clone(path_bare, path_repo_1)
  cloning into '/tmp/Rtmpt0UKnZ/git2r-3dee102f3eb7'...
  > config(repo_1, user.name = "Alice", user.email = "alice@example.org")
  > 
  > ## Add changes to repo 1 and push to bare
  > writeLines("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do",
  +            con = file.path(path_repo_1, "test-1.txt"))
  > add(repo_1, "test-1.txt")
  > commit_1 <- commit(repo_1, "First commit message")
  > push(repo_1, "origin", "refs/heads/master")
  > 
  > ## Clone to repo 2
  > repo_2 <- clone(path_bare, path_repo_2)
  cloning into '/tmp/Rtmpt0UKnZ/git2r-3dee7561b704'...
  > config(repo_2, user.name = "Bob", user.email = "bob@example.org")
  > 
  > ## Add more changes to repo 1 and push to bare
  > writeLines(c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do",
  +              "eiusmod tempor incididunt ut labore et dolore magna aliqua."),
  +            con = file.path(path_repo_1, "test-1.txt"))
  > add(repo_1, "test-1.txt")
  > commit_2 <- commit(repo_1, "Second commit message")
  > push(repo_1, "origin", "refs/heads/master")
  > 
  > ## Pull changes to repo_2
  > pull(repo_2)
  [updated] 5f19714e56..b1b5940e3a refs/remotes/origin/master
  Merge: Fast-forward
  > stopifnot(identical(length(commits(repo_2)), 2L))
  > 
  > ## Check remote url of repo_2
  > stopifnot(identical(
  +     branch_remote_url(branch_get_upstream(repository_head(repo_2))),
  +     path_bare))
  > 
  > ## Unset remote remote tracking branch
  > branch_set_upstream(repository_head(repo_2), NULL)
  > stopifnot(is.null(branch_get_upstream(repository_head(repo_2))))
  > tools::assertError(pull(repo_2))
  > tools::assertError(branch_set_upstream(repository_head(repo_2), NULL))
  > 
  > ## Add more changes to repo 1 and push to bare
  > writeLines(
  +     c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do",
  +       "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad",
  +       "minim veniam, quis nostrud exercitation ullamco laboris nisi ut"),
  +     con = file.path(path_repo_1, "test-1.txt"))
  > add(repo_1, "test-1.txt")
  > commit_3 <- commit(repo_1, "Third commit message")
  > push(repo_1)
  > 
  > ## Set remote tracking branch
  > branch_set_upstream(repository_head(repo_2), "origin/master")
  > stopifnot(identical(
  +     branch_remote_url(branch_get_upstream(repository_head(repo_2))),
  +     path_bare))
  > 
  > ## Pull changes to repo_2
  > pull(repo_2)
  [updated] b1b5940e3a..41442a7933 refs/remotes/origin/master
  Merge: Fast-forward
  > stopifnot(identical(length(commits(repo_2)), 3L))
  > 
  > ## Check references in repo_1 and repo_2. Must clear the repo item
  > ## since the repositories have different paths.
  > stopifnot(identical(length(references(repo_1)), 2L))
  > ref_1 <- references(repo_1)
  > ref_1[[1]]$repo <- NULL
  > ref_1[[2]]$repo <- NULL
  > ref_2 <- references(repo_2)
  > ref_2[[1]]$repo <- NULL
  > ref_2[[2]]$repo <- NULL
  > stopifnot(identical(ref_1, ref_2))
  Error: identical(ref_1, ref_2) is not TRUE
  Execution halted