redmine-backporter.rb: Check remote-tracking branch

on `has_commit` check for the `backport` command.

I don't maintain local "master" branch on my ruby repository for stable
branch maintenance. I want just running `git fetch origin` to make it
work. It should work for those who pull origin/master into their local
master too.
This commit is contained in:
Takashi Kokubun 2026-01-12 16:55:40 -08:00
parent 8d764da357
commit e52aee688b

View File

@ -190,7 +190,7 @@ def backport_command_string
next false if c.match(/\A\d{1,6}\z/) # skip SVN revision
# check if the Git revision is included in master
has_commit(c, "master")
has_commit(c, "origin/master")
end.sort_by do |changeset|
Integer(IO.popen(%W[git show -s --format=%ct #{changeset}], &:read))
end