Skip to content

Commit 40abb0b

Browse files
committed
push Base.push! and LibGit2.push! apart
1 parent 167ef7b commit 40abb0b

File tree

8 files changed

+12
-10
lines changed

8 files changed

+12
-10
lines changed

base/deprecated.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2353,6 +2353,8 @@ end
23532353
@deprecate logspace(start, stop) logspace(start, stop, 50)
23542354

23552355
@deprecate merge!(repo::LibGit2.GitRepo, args...; kwargs...) LibGit2.merge!(repo, args...; kwargs...)
2356+
@deprecate push!(w::LibGit2.GitRevWalker, arg) LibGit2.push!(w, arg)
2357+
23562358

23572359
# 24490 - warnings and messages
23582360
const log_info_to = Dict{Tuple{Union{Module,Nothing},Union{Symbol,Nothing}},IO}()

base/libgit2/callbacks.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ end
343343
function fetchhead_foreach_callback(ref_name::Cstring, remote_url::Cstring,
344344
oid_ptr::Ptr{GitHash}, is_merge::Cuint, payload::Ptr{Cvoid})
345345
fhead_vec = unsafe_pointer_to_objref(payload)::Vector{FetchHead}
346-
push!(fhead_vec, FetchHead(unsafe_string(ref_name), unsafe_string(remote_url),
346+
Base.push!(fhead_vec, FetchHead(unsafe_string(ref_name), unsafe_string(remote_url),
347347
unsafe_load(oid_ptr), is_merge == 1))
348348
return Cint(0)
349349
end

base/libgit2/commit.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function commit(repo::GitRepo, msg::AbstractString;
113113
# Retrieve parents from HEAD
114114
if isempty(parent_ids)
115115
try # if throws then HEAD not found -> empty repo
116-
push!(parent_ids, GitHash(repo, refname))
116+
Base.push!(parent_ids, GitHash(repo, refname))
117117
end
118118
end
119119

@@ -127,7 +127,7 @@ function commit(repo::GitRepo, msg::AbstractString;
127127
parents = GitCommit[]
128128
try
129129
for id in parent_ids
130-
push!(parents, GitCommit(repo, id))
130+
Base.push!(parents, GitCommit(repo, id))
131131
end
132132
commit_id = commit(repo, refname, msg, auth_sig, comm_sig, tree, parents...)
133133
finally

base/libgit2/gitcredential.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ function credential_helpers(cfg::GitConfig, cred::GitCredential)
227227
return GitCredentialHelper[]
228228
end
229229

230-
push!(helpers, parse(GitCredentialHelper, value))
230+
Base.push!(helpers, parse(GitCredentialHelper, value))
231231
end
232232

233233
return helpers

base/libgit2/libgit2.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ function diff_files(repo::GitRepo, branch1::AbstractString, branch2::AbstractStr
206206
delta = diff[i]
207207
delta === nothing && break
208208
if Consts.DELTA_STATUS(delta.status) in filter
209-
push!(files, unsafe_string(delta.new_file.path))
209+
Base.push!(files, unsafe_string(delta.new_file.path))
210210
end
211211
end
212212
close(diff)

base/libgit2/reference.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ function Base.map(f::Function, bi::GitBranchIter)
350350
if res === nothing
351351
res = Vector{typeof(val)}()
352352
end
353-
push!(res, val)
353+
Base.push!(res, val)
354354
val, s = next(bi, s)
355355
end
356356
return res

base/libgit2/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function features()
7171
feat = ccall((:git_libgit2_features, :libgit2), Cint, ())
7272
res = Consts.GIT_FEATURE[]
7373
for f in instances(Consts.GIT_FEATURE)
74-
isset(feat, Cuint(f)) && push!(res, f)
74+
isset(feat, Cuint(f)) && Base.push!(res, f)
7575
end
7676
return res
7777
end

base/libgit2/walker.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ Start the [`GitRevWalker`](@ref) `walker` at commit `cid`. This function can be
6464
to apply a function to all commits since a certain year, by passing the first commit
6565
of that year as `cid` and then passing the resulting `w` to [`map`](@ref LibGit2.map).
6666
"""
67-
function Base.push!(w::GitRevWalker, cid::GitHash)
67+
function push!(w::GitRevWalker, cid::GitHash)
6868
@check ccall((:git_revwalk_push, :libgit2), Cint, (Ptr{Cvoid}, Ptr{GitHash}), w.ptr, Ref(cid))
6969
return w
7070
end
7171

72-
function Base.push!(w::GitRevWalker, range::AbstractString)
72+
function push!(w::GitRevWalker, range::AbstractString)
7373
@check ccall((:git_revwalk_push_range, :libgit2), Cint, (Ptr{Cvoid}, Ptr{UInt8}), w.ptr, range)
7474
return w
7575
end
@@ -126,7 +126,7 @@ function Base.map(f::Function, walker::GitRevWalker;
126126
repo = repository(walker)
127127
while !done(walker, s)
128128
val = f(s[1], repo)
129-
push!(res, val)
129+
Base.push!(res, val)
130130
val, s = next(walker, s)
131131
c +=1
132132
count == c && break

0 commit comments

Comments
 (0)