Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

[breaking] Remove a deprecated function #51

Merged
merged 1 commit into from
Mar 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GitCommand"
uuid = "49b5b516-ca3f-4003-a081-42bdcf55082d"
authors = ["Dilum Aluthge", "Brown Center for Biomedical Informatics"]
version = "2.2.1"
version = "3.0.0-DEV"

[deps]
Git_jll = "f8c6e375-362e-5223-8a59-34ff63f689eb"
Expand Down
8 changes: 0 additions & 8 deletions src/git.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,3 @@ function git(; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true)
return addenv(original_cmd, env_mapping...)::Cmd
end
end

# This function should be deprecated, it's kept only for backward-compatibility
# We will remove it soon in a breaking release
function git(f::Function;
adjust_PATH::Bool = true,
adjust_LIBPATH::Bool = true)
return f(git(; adjust_PATH, adjust_LIBPATH))
end
8 changes: 3 additions & 5 deletions src/repl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ import ReplMaker

function _gitrepl_parser(repl_input::AbstractString)
return quote
GitCommand.git() do git
repl_input = $(Expr(:quote, repl_input))
run(`$(git) $(split(repl_input))`)
return nothing
end
repl_input = $(Expr(:quote, repl_input))
run(`$(GitCommand.git()) $(split(repl_input))`)
return nothing
end
end

Expand Down
8 changes: 3 additions & 5 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ include("test-utils.jl")
with_temp_dir() do tmp_dir
@test !isdir("GitCommand.jl")
@test !isfile(joinpath("GitCommand.jl", "Project.toml"))
git() do git
@test !isdir("GitCommand.jl")
@test !isfile(joinpath("GitCommand.jl", "Project.toml"))
run(`$git clone https://github.com/JuliaVersionControl/GitCommand.jl`)
end
@test !isdir("GitCommand.jl")
@test !isfile(joinpath("GitCommand.jl", "Project.toml"))
run(`$(git()) clone https://github.com/JuliaVersionControl/GitCommand.jl`)
@test isdir("GitCommand.jl")
@test isfile(joinpath("GitCommand.jl", "Project.toml"))
end
Expand Down