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

Reorganize some source code files #55

Merged
merged 2 commits into from
Mar 23, 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
4 changes: 2 additions & 2 deletions src/GitCommand.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module GitCommand

import Git_jll

# export @git_cmd
export git

include("git.jl")
include("git_cmd.jl")

end # end module GitCommand
end # module
11 changes: 0 additions & 11 deletions src/git.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
function _git_cmd(str::AbstractString;
adjust_PATH::Bool = true,
adjust_LIBPATH::Bool = true)
cmd = git(; adjust_PATH, adjust_LIBPATH)
return `$(cmd) $(split(str))`
end

macro git_cmd(ex)
return _git_cmd(ex)
end

function git(; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true)
@static if Sys.iswindows()
return Git_jll.git(; adjust_PATH, adjust_LIBPATH)::Cmd
Expand Down
10 changes: 10 additions & 0 deletions src/git_cmd.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function _git_cmd(str::AbstractString;
adjust_PATH::Bool = true,
adjust_LIBPATH::Bool = true)
cmd = git(; adjust_PATH, adjust_LIBPATH)
return `$(cmd) $(split(str))`
end

macro git_cmd(ex)
return _git_cmd(ex)
end