Running ‘add-force.R’
  Running ‘bare_repository.R’
  Running ‘blame.R’
  Running ‘blob.R’
  Running ‘branch.R’
  Running ‘checkout-named-branch.R’
  Running ‘checkout.R’
  Running ‘checkout_branch.R’
  Running ‘checkout_commit.R’
  Running ‘checkout_tag.R’
  Running ‘clone_bare.R’
  Running ‘clone_branch.R’
  Running ‘clone_checkout.R’
  Running ‘commit.R’
  Running ‘config.R’
  Running ‘diff.R’
  Running ‘fast_forward_merge.R’
  Running ‘fetch.R’
  Running ‘graph.R’
  Running ‘index.R’
  Running ‘invalid-conf-var.R’
  Running ‘libgit2.R’
  Running ‘merge.R’
  Running ‘merge_named_branch.R’
  Running ‘normal_merge.R’
  Running ‘note.R’
  Running ‘odb_blobs.R’
  Running ‘pre-process-path.R’
  Running ‘pull.R’
  Running ‘push-force.R’
  Running ‘push.R’
  Running ‘reference.R’
  Running ‘reflog.R’
  Running ‘refspec.R’
  Running ‘remotes.R’
  Running ‘remove.R’
  Running ‘repository.R’
  Running ‘reset.R’
  Running ‘revparse.R’
  Running ‘signature.R’
  Running ‘stash.R’
  Running ‘status.R’
  Running ‘tag.R’
  Running ‘time.R’
  Running ‘tree.R’
  Running ‘when.R’
Running the tests in ‘tests/blob.R’ failed.
Complete output:
  > ## git2r, R bindings to the libgit2 library.
  > ## Copyright (C) 2013-2018 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) (2018-12-26 r75909)
  Platform: x86_64-pc-linux-gnu (64-bit)
  Running under: Fedora 28 (Workstation Edition)
  
  Matrix products: default
  BLAS: /data/gannet/ripley/R/R-devel/lib/libRblas.so
  LAPACK: /data/gannet/ripley/R/R-devel/lib/libRlapack.so
  
  locale:
   [1] LC_CTYPE=en_GB.utf8        LC_NUMERIC=C              
   [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=C              
   [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   
   [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
   [9] LC_ADDRESS=C               LC_TELEPHONE=C            
  [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
  [1] git2r_0.23.0
  
  loaded via a namespace (and not attached):
  [1] compiler_3.6.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
  > f <- file(file.path(path, "test.txt"), "wb")
  > writeChar("Hello world!\n", f, eos = NULL)
  > close(f)
  > 
  > ## add and commit
  > add(repo, "test.txt")
  > new_commit <- commit(repo, "Commit message")
  > 
  > ## Lookup blob
  > blob <- lookup(repo, "cd0875583aabe89ee197ea133980a9085d08e497")
  > stopifnot(isTRUE(is_blob(blob)))
  > stopifnot(identical(is_binary(blob), FALSE))
  > stopifnot(identical(blob, lookup(repo, "cd0875")))
  > stopifnot(identical(length(blob), 13L))
  > stopifnot(identical(content(blob), "Hello world!"))
  > blob
  blob:  cd0875583aabe89ee197ea133980a9085d08e497
  size:  13 bytes
  > 
  > ## Add one more commit
  > f <- file(file.path(path, "test.txt"), "wb")
  > writeChar("Hello world!\nHELLO WORLD!\nHeLlO wOrLd!\n", f, eos = NULL)
  > close(f)
  > add(repo, "test.txt")
  > blob <- lookup(repo, tree(commit(repo, "New commit message"))$id[1])
  > stopifnot(identical(content(blob),
  +                     c("Hello world!", "HELLO WORLD!", "HeLlO wOrLd!")))
  > 
  > ## Hash
  > stopifnot(identical(hash("Hello, world!\n"),
  +                     "af5626b4a114abcb82d63db7c8082c3c4756e51b"))
  > stopifnot(identical(hash("test content\n"),
  +                     "d670460b4b4aece5915caf5c68d12f560a9fe3e4"))
  > stopifnot(identical(hash(c("Hello, world!\n",
  +                            "test content\n")),
  +                     c("af5626b4a114abcb82d63db7c8082c3c4756e51b",
  +                       "d670460b4b4aece5915caf5c68d12f560a9fe3e4")))
  > stopifnot(identical(hash(c("Hello, world!\n",
  +                            NA_character_,
  +                            "test content\n")),
  +                     c("af5626b4a114abcb82d63db7c8082c3c4756e51b",
  +                       NA_character_,
  +                       "d670460b4b4aece5915caf5c68d12f560a9fe3e4")))
  > stopifnot(identical(hash(character(0)), character(0)))
  > 
  > ## Hash file
  > test_1_txt <- file(file.path(path, "test-1.txt"), "wb")
  > writeChar("Hello, world!\n", test_1_txt, eos = NULL)
  > close(test_1_txt)
  > test_2_txt <- file(file.path(path, "test-2.txt"), "wb")
  > writeChar("test content\n", test_2_txt, eos = NULL)
  > close(test_2_txt)
  > stopifnot(identical(hash("Hello, world!\n"),
  +                     hashfile(file.path(path, "test-1.txt"))))
  > stopifnot(identical(hash("test content\n"),
  +                     hashfile(file.path(path, "test-2.txt"))))
  > stopifnot(identical(hash(c("Hello, world!\n",
  +                            "test content\n")),
  +                     hashfile(c(file.path(path, "test-1.txt"),
  +                                file.path(path, "test-2.txt")))))
  > tools::assertError(hashfile(c(file.path(path, "test-1.txt"),
  +                               NA_character_,
  +                               file.path(path, "test-2.txt"))))
  Error: Failed to get error in evaluating hashfile(c(file.path(path, "te  ...
  Execution halted