From ec8e2f65fbaa994923463bbbdcf1ef289b5c7279 Mon Sep 17 00:00:00 2001 From: Simon Byrne Date: Wed, 25 Jan 2017 11:48:36 +0000 Subject: [PATCH] changes suggested by @kshyatt --- base/libgit2/index.jl | 3 +-- base/libgit2/libgit2.jl | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/base/libgit2/index.jl b/base/libgit2/index.jl index 63fe43149124f..668f67570f3cd 100644 --- a/base/libgit2/index.jl +++ b/base/libgit2/index.jl @@ -43,9 +43,8 @@ function read_tree!(idx::GitIndex, tree::GitTree) @check ccall((:git_index_read_tree, :libgit2), Cint, (Ptr{Void}, Ptr{Void}), idx.ptr, tree.ptr) end -function read_tree!(idx::GitIndex, hash::AbstractGitHash) +read_tree!(idx::GitIndex, hash::AbstractGitHash) = read_tree!(idx, GitTree(repository(idx), hash)) -end function add!{T<:AbstractString}(idx::GitIndex, files::T...; flags::Cuint = Consts.INDEX_ADD_DEFAULT) diff --git a/base/libgit2/libgit2.jl b/base/libgit2/libgit2.jl index b06e713598054..3d89b7aacfe1c 100644 --- a/base/libgit2/libgit2.jl +++ b/base/libgit2/libgit2.jl @@ -337,9 +337,8 @@ function reset!(repo::GitRepo, committish::AbstractString, pathspecs::AbstractSt end """ git reset [--soft | --mixed | --hard] """ -function reset!(repo::GitRepo, id::GitHash, mode::Cint = Consts.RESET_MIXED) +reset!(repo::GitRepo, id::GitHash, mode::Cint = Consts.RESET_MIXED) = reset!(repo, GitObject(repo, id), mode) -end """ git cat-file """ function cat(repo::GitRepo, spec)