Skip to content

Instantly share code, notes, and snippets.

@ihnorton
Last active June 23, 2017 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ihnorton/bc452cbd54a6d74fd2aa30bf0a53fc01 to your computer and use it in GitHub Desktop.
Save ihnorton/bc452cbd54a6d74fd2aa30bf0a53fc01 to your computer and use it in GitHub Desktop.
find new authors between git tags in julia
begin
# assuming pwd is a julia git clone
vers = ["v0.2.0", "v0.3.0", "v0.4.0", "v0.5.0", "release-0.6"]
auths = Dict{String, Vector{String}}()
for v in vers
auths[v] = unique(map(chomp, readlines(`git log --format=%aN $v`)))
end
for i in 2:length(vers)
v1,v2 = vers[i-1],vers[i]
diff = setdiff(auths[v2], auths[v1])
println("$v1 to $v2: $(length(diff))")
println("authors: ...")
print(diff)
print("\n\n\n")
end
end
function last_first_sort(s1,s2)
s1s = split(lowercase(s1))
s2s = split(lowercase(s2))
s1k = length(s1s) > 1 ? s1s[end] : s1s[1]
s2k = length(s2s) > 1 ? s2s[end] : s2s[1]
return s1k < s2k
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment