Repository: VirtusLab/git-machete
Pull request #1260 (2024-05-24 13:33:59)

Bump version to 3.26.1


Patch:
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 6809bee..260c9f8 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,5 +1,7 @@
 # Release notes
 
+## New in git-machete 3.26.1
+
 ## New in git-machete 3.26.0
 
 - added: better detection of squash merges and rebases, controlled by flag `--squash-merge-detection={none,simple,exact}` (`status` and `traverse`) and git config key `machete.squashMergeDetection` (contributed by @gjulianm)
diff --git a/docs/man/git-machete.1 b/docs/man/git-machete.1
index 73805f9..abe6948 100644
--- a/docs/man/git-machete.1
+++ b/docs/man/git-machete.1
@@ -29,7 +29,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
 ..
 .TH "GIT-MACHETE" "1" "May 24, 2024" "" "git-machete"
 .SH NAME
-git-machete \- git-machete 3.26.0
+git-machete \- git-machete 3.26.1
 .sp
 git machete is a robust tool that \fBsimplifies your git workflows\fP\&.
 .sp
diff --git a/git_machete/__init__.py b/git_machete/__init__.py
index c1292df..02d83ec 100644
--- a/git_machete/__init__.py
+++ b/git_machete/__init__.py
@@ -1,1 +1,1 @@
-__version__ = '3.26.0'
+__version__ = '3.26.1'
diff --git a/git_machete/client.py b/git_machete/client.py
index 742a326..34531ed 100644
--- a/git_machete/client.py
+++ b/git_machete/client.py
@@ -2572,7 +2572,7 @@ class MacheteClient:
         remote_branch = RemoteBranchShortName(f"{org_repo_remote.remote}/{base}")
         remote_base_branch_exists_locally = remote_branch in self.__git.get_remote_branches()
         print(f"Checking if {spec.base_branch_name} branch {bold(base)} "
-              f"exists on {bold(org_repo_remote.remote)} remote... ", end='', flush=True)
+              f"exists in {bold(org_repo_remote.remote)} remote... ", end='', flush=True)
         base_branch_found_on_remote = self.__git.does_remote_branch_exist(org_repo_remote.remote, base)
         print(fmt('<green><b>YES</b></green>' if base_branch_found_on_remote else '<red><b>NO</b></red>'))
         if not base_branch_found_on_remote and remote_base_branch_exists_locally:
diff --git a/git_machete/git_config_keys.py b/git_machete/git_config_keys.py
index 63d290c..88dc170 100644
--- a/git_machete/git_config_keys.py
+++ b/git_machete/git_config_keys.py
@@ -1,7 +1,7 @@
+SQUASH_MERGE_DETECTION = 'machete.squashMergeDetection'
 STATUS_EXTRA_SPACE_BEFORE_BRANCH_NAME = 'machete.status.extraSpaceBeforeBranchName'
 TRAVERSE_PUSH = 'machete.traverse.push'
 WORKTREE_USE_TOP_LEVEL_MACHETE_FILE = 'machete.worktree.useTopLevelMacheteFile'
-SQUASH_MERGE_DETECTION = 'machete.squashMergeDetection'
 
 
 def override_fork_point_to(branch: str) -> str:
diff --git a/git_machete/options.py b/git_machete/options.py
index 2d4d593..68a0996 100644
--- a/git_machete/options.py
+++ b/git_machete/options.py
@@ -21,8 +21,6 @@ class CommandLineOptions:
         self.opt_list_commits_with_hashes: bool = False
         self.opt_merge: bool = False
         self.opt_n: bool = False
-        self.opt_squash_merge_detection_string: str = "simple"
-        self.opt_squash_merge_detection_origin: Optional[str] = None
         self.opt_no_edit_merge: bool = False
         self.opt_no_interactive_rebase: bool = False
         self.opt_onto: Optional[LocalBranchShortName] = None
@@ -34,6 +32,8 @@ class CommandLineOptions:
         self.opt_removed_from_remote: bool = False
         self.opt_return_to: str = "stay"
         self.opt_roots: List[LocalBranchShortName] = list()
+        self.opt_squash_merge_detection_origin: Optional[str] = None
+        self.opt_squash_merge_detection_string: str = "simple"
         self.opt_start_from: str = "here"
         self.opt_stat: bool = False
         self.opt_sync_github_prs: bool = False


Test patch:
diff --git a/tests/test_github_create_pr.py b/tests/test_github_create_pr.py
index dd24c0c..104246a 100644
--- a/tests/test_github_create_pr.py
+++ b/tests/test_github_create_pr.py
@@ -142,7 +142,7 @@ class TestGitHubCreatePR(BaseTest):
                 |
                 x-drop-constraint (untracked)
 
-            Checking if base branch ignore-trailing exists on origin remote... YES
+            Checking if base branch ignore-trailing exists in origin remote... YES
             Creating a draft PR from chore/fields to ignore-trailing... OK, see www.github.com
             Checking for open GitHub PRs (to determine PR chain)... OK
             Updating description of PR #5 to include the chain of PRs... OK
@@ -289,7 +289,7 @@ class TestGitHubCreatePR(BaseTest):
               |
               o-testing/endpoints
 
-            Checking if base branch develop exists on origin remote... YES
+            Checking if base branch develop exists in origin remote... YES
             Creating a PR from allow-ownership-link to develop... OK, see www.github.com
             Setting milestone of PR #7 to 42... OK
             Adding github_user as assignee to PR #7... OK
@@ -428,7 +428,7 @@ class TestGitHubCreatePR(BaseTest):
             """
         rewrite_branch_layout_file(body)
 
-        expected_msg = ("Checking if base branch feature/api_handling exists on origin remote... NO\n"
+        expected_msg = ("Checking if base branch feature/api_handling exists in origin remote... NO\n"
                         "Pushing untracked branch feature/api_handling to origin...\n"
                         "Creating a PR from feature/api_exception_handling to feature/api_handling... OK, see www.github.com\n")
 
@@ -561,7 +561,7 @@ class TestGitHubCreatePR(BaseTest):
             |
             o-feature *
 
-        Checking if base branch branch-1 exists on origin_1 remote... YES
+        Checking if base branch branch-1 exists in origin_1 remote... YES
         Creating a PR from feature to branch-1... OK, see www.github.com
         Checking for open GitHub PRs (to determine PR chain)... OK
         Updating description of PR #16 to include the chain of PRs... OK
@@ -612,7 +612,7 @@ class TestGitHubCreatePR(BaseTest):
         expected_result = """
         Add feature_1 onto the inferred upstream (parent) branch feature? (y, N)
         Added branch feature_1 onto feature
-        Checking if base branch feature exists on origin_2 remote... YES
+        Checking if base branch feature exists in origin_2 remote... YES
         Creating a PR from feature_1 to feature... OK, see www.github.com
         Checking for open GitHub PRs (to determine PR chain)... OK
         Updating description of PR #17 to include the chain of PRs... OK
@@ -650,7 +650,7 @@ class TestGitHubCreatePR(BaseTest):
               |
               o-feature_2 *
 
-        Checking if base branch feature exists on origin_1 remote... YES
+        Checking if base branch feature exists in origin_1 remote... YES
         Creating a PR from feature_2 to feature... OK, see www.github.com
         Checking for open GitHub PRs (to determine PR chain)... OK
         Updating description of PR #18 to include the chain of PRs... OK
@@ -672,7 +672,7 @@ class TestGitHubCreatePR(BaseTest):
         expected_result = """
         Add feature_3 onto the inferred upstream (parent) branch feature_2? (y, N)
         Added branch feature_3 onto feature_2
-        Checking if base branch feature_2 exists on origin_1 remote... YES
+        Checking if base branch feature_2 exists in origin_1 remote... YES
         Creating a PR from feature_3 to feature_2... OK, see www.github.com
         Checking for open GitHub PRs (to determine PR chain)... OK
         Updating description of PR #19 to include the chain of PRs... OK
@@ -694,7 +694,7 @@ class TestGitHubCreatePR(BaseTest):
         expected_result = """
         Add feature_4 onto the inferred upstream (parent) branch feature_3? (y, N)
         Added branch feature_4 onto feature_3
-        Checking if base branch feature_3 exists on origin_2 remote... NO
+        Checking if base branch feature_3 exists in origin_2 remote... NO
         Push untracked branch feature_3 to origin_2? (y, Q)
         Creating a PR from feature_4 to feature_3... OK, see www.github.com
         """
@@ -716,7 +716,7 @@ class TestGitHubCreatePR(BaseTest):
         expected_result = """
         Add feature_5 onto the inferred upstream (parent) branch feature_3? (y, N)
         Added branch feature_5 onto feature_3
-        Checking if base branch feature_3 exists on origin remote... NO
+        Checking if base branch feature_3 exists in origin remote... NO
         Push untracked branch feature_3 to origin? (y, Q)
         Creating a PR from feature_5 to feature_3... OK, see www.github.com
         """
@@ -741,7 +741,7 @@ class TestGitHubCreatePR(BaseTest):
         assert_success(
             ['github', 'create-pr'],
             """
-            Checking if base branch master exists on origin remote... YES
+            Checking if base branch master exists in origin remote... YES
             Creating a PR from develop to master... OK, see www.github.com
             """
         )
@@ -786,7 +786,7 @@ class TestGitHubCreatePR(BaseTest):
             """
             Warn: Branch develop is behind its remote counterpart. Consider using git pull.
             Proceed with creating pull request? (y, Q)
-            Checking if base branch master exists on origin remote... YES
+            Checking if base branch master exists in origin remote... YES
             Creating a PR from develop to master... OK, see www.github.com
             """
         )
@@ -846,7 +846,7 @@ class TestGitHubCreatePR(BaseTest):
             """
             Warn: Branch develop is diverged from and older than its remote counterpart. Consider using git reset --keep.
             Proceed with creating pull request? (y, Q)
-            Checking if base branch master exists on origin remote... YES
+            Checking if base branch master exists in origin remote... YES
             Creating a PR from develop to master... OK, see www.github.com
             """
         )
@@ -873,7 +873,7 @@ class TestGitHubCreatePR(BaseTest):
         assert_success(
             ['github', 'create-pr'],
             """
-            Checking if base branch develop exists on origin remote... NO
+            Checking if base branch develop exists in origin remote... NO
             Push untracked branch develop to origin? (y, Q)
             Creating a PR from feature to develop... OK, see www.github.com
             """
@@ -895,7 +895,7 @@ class TestGitHubCreatePR(BaseTest):
         assert_success(
             ['github', 'create-pr'],
             """
-            Checking if base branch develop exists on origin remote... YES
+            Checking if base branch develop exists in origin remote... YES
             Creating a PR from feature to develop... OK, see www.github.com
             """
         )
diff --git a/tests/test_gitlab_create_mr.py b/tests/test_gitlab_create_mr.py
index c690587..eaf1d36 100644
--- a/tests/test_gitlab_create_mr.py
+++ b/tests/test_gitlab_create_mr.py
@@ -141,7 +141,7 @@ class TestGitLabCreateMR(BaseTest):
                 |
                 x-drop-constraint (untracked)
 
-            Checking if target branch ignore-trailing exists on origin remote... YES
+            Checking if target branch ignore-trailing exists in origin remote... YES
             Creating a draft MR from chore/fields to ignore-trailing... OK, see www.gitlab.com
             Checking for open GitLab MRs (to determine MR chain)... OK
             Updating description of MR !5 to include the chain of MRs... OK
@@ -287,7 +287,7 @@ class TestGitLabCreateMR(BaseTest):
               |
               o-testing/endpoints
 
-            Checking if target branch develop exists on origin remote... YES
+            Checking if target branch develop exists in origin remote... YES
             Creating a MR from allow-ownership-link to develop... OK, see www.gitlab.com
             Setting milestone of MR !7 to 42... OK
             Adding gitlab_user as assignee to MR !7... OK
@@ -423,7 +423,7 @@ class TestGitLabCreateMR(BaseTest):
             """
         rewrite_branch_layout_file(body)
 
-        expected_msg = ("Checking if target branch feature/api_handling exists on origin remote... NO\n"
+        expected_msg = ("Checking if target branch feature/api_handling exists in origin remote... NO\n"
                         "Pushing untracked branch feature/api_handling to origin...\n"
                         "Creating a MR from feature/api_exception_handling to feature/api_handling... OK, see www.gitlab.com\n")
 
@@ -556,7 +556,7 @@ class TestGitLabCreateMR(BaseTest):
             |
             o-feature *
 
-        Checking if target branch branch-1 exists on origin_1 remote... YES
+        Checking if target branch branch-1 exists in origin_1 remote... YES
         Creating a MR from feature to branch-1... OK, see www.gitlab.com
         Checking for open GitLab MRs (to determine MR chain)... OK
         Updating description of MR !16 to include the chain of MRs... OK
@@ -607,7 +607,7 @@ class TestGitLabCreateMR(BaseTest):
         expected_result = """
         Add feature_1 onto the inferred upstream (parent) branch feature? (y, N)
         Added branch feature_1 onto feature
-        Checking if target branch feature exists on origin_2 remote... YES
+        Checking if target branch feature exists in origin_2 remote... YES
         Creating a MR from feature_1 to feature... OK, see www.gitlab.com
         Checking for open GitLab MRs (to determine MR chain)... OK
         Updating description of MR !17 to include the chain of MRs... OK
@@ -645,7 +645,7 @@ class TestGitLabCreateMR(BaseTest):
               |
               o-feature_2 *
 
-        Checking if target branch feature exists on origin_1 remote... YES
+        Checking if target branch feature exists in origin_1 remote... YES
         Creating a MR from feature_2 to feature... OK, see www.gitlab.com
         Checking for open GitLab MRs (to determine MR chain)... OK
         Updating description of MR !18 to include the chain of MRs... OK
@@ -667,7 +667,7 @@ class TestGitLabCreateMR(BaseTest):
         expected_result = """
         Add feature_3 onto the inferred upstream (parent) branch feature_2? (y, N)
         Added branch feature_3 onto feature_2
-        Checking if target branch feature_2 exists on origin_1 remote... YES
+        Checking if target branch feature_2 exists in origin_1 remote... YES
         Creating a MR from feature_3 to feature_2... OK, see www.gitlab.com
         Checking for open GitLab MRs (to determine MR chain)... OK
         Updating description of MR !19 to include the chain of MRs... OK
@@ -689,7 +689,7 @@ class TestGitLabCreateMR(BaseTest):
         expected_result = """
         Add feature_4 onto the inferred upstream (parent) branch feature_3? (y, N)
         Added branch feature_4 onto feature_3
-        Checking if target branch feature_3 exists on origin_2 remote... NO
+        Checking if target branch feature_3 exists in origin_2 remote... NO
         Push untracked branch feature_3 to origin_2? (y, Q)
         Creating a MR from feature_4 to feature_3... OK, see www.gitlab.com
         """
@@ -711,7 +711,7 @@ class TestGitLabCreateMR(BaseTest):
         expected_result = """
         Add feature_5 onto the inferred upstream (parent) branch feature_3? (y, N)
         Added branch feature_5 onto feature_3
-        Checking if target branch feature_3 exists on origin remote... NO
+        Checking if target branch feature_3 exists in origin remote... NO
         Push untracked branch feature_3 to origin? (y, Q)
         Creating a MR from feature_5 to feature_3... OK, see www.gitlab.com
         """
@@ -736,7 +736,7 @@ class TestGitLabCreateMR(BaseTest):
         assert_success(
             ['gitlab', 'create-mr'],
             """
-            Checking if target branch master exists on origin remote... YES
+            Checking if target branch master exists in origin remote... YES
             Creating a MR from develop to master... OK, see www.gitlab.com
             """
         )
@@ -781,7 +781,7 @@ class TestGitLabCreateMR(BaseTest):
             """
             Warn: Branch develop is behind its remote counterpart. Consider using git pull.
             Proceed with creating merge request? (y, Q)
-            Checking if target branch master exists on origin remote... YES
+            Checking if target branch master exists in origin remote... YES
             Creating a MR from develop to master... OK, see www.gitlab.com
             """
         )
@@ -841,7 +841,7 @@ class TestGitLabCreateMR(BaseTest):
             """
             Warn: Branch develop is diverged from and older than its remote counterpart. Consider using git reset --keep.
             Proceed with creating merge request? (y, Q)
-            Checking if target branch master exists on origin remote... YES
+            Checking if target branch master exists in origin remote... YES
             Creating a MR from develop to master... OK, see www.gitlab.com
             """
         )
@@ -868,7 +868,7 @@ class TestGitLabCreateMR(BaseTest):
         assert_success(
             ['gitlab', 'create-mr'],
             """
-            Checking if target branch develop exists on origin remote... NO
+            Checking if target branch develop exists in origin remote... NO
             Push untracked branch develop to origin? (y, Q)
             Creating a MR from feature to develop... OK, see www.gitlab.com
             """
@@ -890,7 +890,7 @@ class TestGitLabCreateMR(BaseTest):
         assert_success(
             ['gitlab', 'create-mr'],
             """
-            Checking if target branch develop exists on origin remote... YES
+            Checking if target branch develop exists in origin remote... YES
             Creating a MR from feature to develop... OK, see www.gitlab.com
             """
         )