From 0837b5707ac654e04e62e9248800acf2f11ebc78 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 10 Feb 2025 17:26:29 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=9A=91=20Check=20commit=20number=20ag?= =?UTF-8?q?ainst=20upstream=20branch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, the `git log` command would run against an unresolved branch reference which might point to the wrong thing locally. This patch makes it more predictable by specifying the exact remote branch. Fixes #155. --- cherry_picker/cherry_picker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cherry_picker/cherry_picker.py b/cherry_picker/cherry_picker.py index 52df11d..bc95424 100755 --- a/cherry_picker/cherry_picker.py +++ b/cherry_picker/cherry_picker.py @@ -636,7 +636,7 @@ def continue_cherry_pick(self): ] self.commit_sha1 = get_full_sha_from_short(short_sha) - commits = get_commits_from_backport_branch(base) + commits = get_commits_from_backport_branch(f"{self.upstream_remote}/{base}") if len(commits) == 1: commit_message = self.amend_commit_message(cherry_pick_branch) else: From fbc8b5c1ecf21745c6f831c3a9b0ef49ec13028e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=87=BA=F0=9F=87=A6=20Sviatoslav=20Sydorenko=20=28?= =?UTF-8?q?=D0=A1=D0=B2=D1=8F=D1=82=D0=BE=D1=81=D0=BB=D0=B0=D0=B2=20=D0=A1?= =?UTF-8?q?=D0=B8=D0=B4=D0=BE=D1=80=D0=B5=D0=BD=D0=BA=D0=BE=29?= Date: Fri, 11 Apr 2025 17:14:33 +0200 Subject: [PATCH 2/2] Access computed `upstream` property instead of `upstream_remote` --- cherry_picker/cherry_picker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cherry_picker/cherry_picker.py b/cherry_picker/cherry_picker.py index bc95424..224f0c6 100755 --- a/cherry_picker/cherry_picker.py +++ b/cherry_picker/cherry_picker.py @@ -636,7 +636,7 @@ def continue_cherry_pick(self): ] self.commit_sha1 = get_full_sha_from_short(short_sha) - commits = get_commits_from_backport_branch(f"{self.upstream_remote}/{base}") + commits = get_commits_from_backport_branch(f"{self.upstream}/{base}") if len(commits) == 1: commit_message = self.amend_commit_message(cherry_pick_branch) else: