bin/git-topic-completion in git-topic-0.2.2 vs bin/git-topic-completion in git-topic-0.2.3
- old
+ new
@@ -22,16 +22,17 @@
end.reject do |b|
b =~ %r{^#{user}/}
end.compact
end
- def my_reject_review_and_local_wip_branches
+ def my_reject_review_and_all_wip_branches
branches.map do |b|
b =~ %r{^(wip)/#{user}/(.*)} ||
b =~ %r{^remotes/origin/(rejected)/#{user}/(.*)} ||
b =~ %r{^remotes/origin/(review)/#{user}/(.*)}
- suggestion = [$1,$2].compact.join("/")
+ b =~ %r{^remotes/origin/(wip)/(\S*?)/(.*)}
+ suggestion = [$1,($2 unless $2 == user), $3].compact.join("/")
suggestion unless suggestion.strip.empty?
end.compact
end
def complete
@@ -42,10 +43,10 @@
when "accept"
when "reject"
when "done"
# nothing
when "work-on"
- my_reject_review_and_local_wip_branches
+ my_reject_review_and_all_wip_branches
when "review"
others_review_branches
end || []
suggestions.each{ |s| puts s }