diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index 89291f1951..3220b84589 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -534,7 +534,7 @@ upload. Args: * branch (str): new branch name, which must not yet exist. * name (str): step name. - * upstream (str): to origin/main. + * upstream (str): to origin/master. * kwargs: Forwarded to '__call__'. — **def [rebase](/recipes/recipe_modules/git/api.py#328)(self, name_prefix, branch, dir_path, remote_name=None, \*\*kwargs):** diff --git a/recipes/recipe_modules/git/api.py b/recipes/recipe_modules/git/api.py index b193a34cd0..e4390f713f 100644 --- a/recipes/recipe_modules/git/api.py +++ b/recipes/recipe_modules/git/api.py @@ -211,16 +211,16 @@ class GitApi(recipe_api.RecipeApi): # There are five kinds of refs we can be handed: # 0) None. In this case, we default to api.buildbucket.gitiles_commit.ref. - # 1) A fully qualified branch name, e.g. 'refs/heads/main'. + # 1) A fully qualified branch name, e.g. 'refs/heads/master'. # Chop off 'refs/heads/' and now it matches case (4). # 2) A 40-character SHA1 hash. # 3) A fully-qualifed arbitrary ref, e.g. 'refs/foo/bar/baz'. - # 4) A branch name, e.g. 'main'. + # 4) A branch name, e.g. 'master'. # Note that 'FETCH_HEAD' can be many things (and therefore not a valid # checkout target) if many refs are fetched, but we only explicitly fetch # one ref here, so this is safe. if not ref: # Case 0. - ref = self.m.buildbucket.gitiles_commit.ref or 'HEAD' + ref = self.m.buildbucket.gitiles_commit.ref or 'master' # If it's a fully-qualified branch name, trim the 'refs/heads/' prefix. if ref.startswith('refs/heads/'): # Case 1. @@ -396,7 +396,7 @@ class GitApi(recipe_api.RecipeApi): Args: * branch (str): new branch name, which must not yet exist. * name (str): step name. - * upstream (str): to origin/main. + * upstream (str): to origin/master. * kwargs: Forwarded to '__call__'. """ env = self.m.context.env diff --git a/recipes/recipe_modules/git/examples/full.expected/basic.json b/recipes/recipe_modules/git/examples/full.expected/basic.json index 7b3b676197..176c6af755 100644 --- a/recipes/recipe_modules/git/examples/full.expected/basic.json +++ b/recipes/recipe_modules/git/examples/full.expected/basic.json @@ -16,7 +16,7 @@ "git", "fetch", "origin", - "HEAD", + "master", "--recurse-submodules", "--progress" ], diff --git a/recipes/recipe_modules/git/examples/full.expected/basic_file_name.json b/recipes/recipe_modules/git/examples/full.expected/basic_file_name.json index 97c1d02d80..1275a56736 100644 --- a/recipes/recipe_modules/git/examples/full.expected/basic_file_name.json +++ b/recipes/recipe_modules/git/examples/full.expected/basic_file_name.json @@ -16,7 +16,7 @@ "git", "fetch", "origin", - "HEAD", + "master", "--recurse-submodules", "--progress" ], diff --git a/recipes/recipe_modules/git/examples/full.expected/basic_submodule_update_force.json b/recipes/recipe_modules/git/examples/full.expected/basic_submodule_update_force.json index 5798c2028b..b464689b26 100644 --- a/recipes/recipe_modules/git/examples/full.expected/basic_submodule_update_force.json +++ b/recipes/recipe_modules/git/examples/full.expected/basic_submodule_update_force.json @@ -16,7 +16,7 @@ "git", "fetch", "origin", - "HEAD", + "master", "--recurse-submodules", "--progress" ], diff --git a/recipes/recipe_modules/git/examples/full.expected/basic_tags.json b/recipes/recipe_modules/git/examples/full.expected/basic_tags.json index 8dc9372347..c82fc0f387 100644 --- a/recipes/recipe_modules/git/examples/full.expected/basic_tags.json +++ b/recipes/recipe_modules/git/examples/full.expected/basic_tags.json @@ -16,7 +16,7 @@ "git", "fetch", "origin", - "HEAD", + "master", "--recurse-submodules", "--progress", "--tags" diff --git a/recipes/recipe_modules/git/examples/full.expected/can_fail_build.json b/recipes/recipe_modules/git/examples/full.expected/can_fail_build.json index 9562d7bebd..bbe7b50f97 100644 --- a/recipes/recipe_modules/git/examples/full.expected/can_fail_build.json +++ b/recipes/recipe_modules/git/examples/full.expected/can_fail_build.json @@ -16,7 +16,7 @@ "git", "fetch", "origin", - "HEAD", + "master", "--recurse-submodules", "--progress" ], diff --git a/recipes/recipe_modules/git/examples/full.expected/cannot_fail_build.json b/recipes/recipe_modules/git/examples/full.expected/cannot_fail_build.json index c0ad995401..c41a265ec5 100644 --- a/recipes/recipe_modules/git/examples/full.expected/cannot_fail_build.json +++ b/recipes/recipe_modules/git/examples/full.expected/cannot_fail_build.json @@ -16,7 +16,7 @@ "git", "fetch", "origin", - "HEAD", + "master", "--recurse-submodules", "--progress" ], diff --git a/recipes/recipe_modules/git/examples/full.expected/count-objects_delta.json b/recipes/recipe_modules/git/examples/full.expected/count-objects_delta.json index f6474708fd..8cef208cd5 100644 --- a/recipes/recipe_modules/git/examples/full.expected/count-objects_delta.json +++ b/recipes/recipe_modules/git/examples/full.expected/count-objects_delta.json @@ -37,7 +37,7 @@ "git", "fetch", "origin", - "HEAD", + "master", "--recurse-submodules", "--progress" ], diff --git a/recipes/recipe_modules/git/examples/full.expected/count-objects_failed.json b/recipes/recipe_modules/git/examples/full.expected/count-objects_failed.json index 0d1d714124..7b036a1b1d 100644 --- a/recipes/recipe_modules/git/examples/full.expected/count-objects_failed.json +++ b/recipes/recipe_modules/git/examples/full.expected/count-objects_failed.json @@ -16,7 +16,7 @@ "git", "fetch", "origin", - "HEAD", + "master", "--recurse-submodules", "--progress" ], diff --git a/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output.json b/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output.json index 77197bba96..2f0af94031 100644 --- a/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output.json +++ b/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output.json @@ -16,7 +16,7 @@ "git", "fetch", "origin", - "HEAD", + "master", "--recurse-submodules", "--progress" ], diff --git a/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output_fails_build.json b/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output_fails_build.json index e0b07f29c7..6b63b36bc8 100644 --- a/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output_fails_build.json +++ b/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output_fails_build.json @@ -16,7 +16,7 @@ "git", "fetch", "origin", - "HEAD", + "master", "--recurse-submodules", "--progress" ], diff --git a/recipes/recipe_modules/git/examples/full.expected/git-cache-checkout.json b/recipes/recipe_modules/git/examples/full.expected/git-cache-checkout.json index d62f991701..08c4aa43f8 100644 --- a/recipes/recipe_modules/git/examples/full.expected/git-cache-checkout.json +++ b/recipes/recipe_modules/git/examples/full.expected/git-cache-checkout.json @@ -64,7 +64,7 @@ "git", "fetch", "origin", - "HEAD", + "master", "--recurse-submodules", "--progress" ], diff --git a/recipes/recipe_modules/git/examples/full.expected/platform_win.json b/recipes/recipe_modules/git/examples/full.expected/platform_win.json index c18c699023..140a12904d 100644 --- a/recipes/recipe_modules/git/examples/full.expected/platform_win.json +++ b/recipes/recipe_modules/git/examples/full.expected/platform_win.json @@ -16,7 +16,7 @@ "git", "fetch", "origin", - "HEAD", + "master", "--recurse-submodules", "--progress" ], diff --git a/recipes/recipe_modules/git/examples/full.expected/rebase_failed.json b/recipes/recipe_modules/git/examples/full.expected/rebase_failed.json index c5bf11828e..d6df9e2701 100644 --- a/recipes/recipe_modules/git/examples/full.expected/rebase_failed.json +++ b/recipes/recipe_modules/git/examples/full.expected/rebase_failed.json @@ -16,7 +16,7 @@ "git", "fetch", "origin", - "HEAD", + "master", "--recurse-submodules", "--progress" ], diff --git a/recipes/recipe_modules/git/examples/full.expected/remote_not_origin.json b/recipes/recipe_modules/git/examples/full.expected/remote_not_origin.json index 5853ac4c13..427935de0a 100644 --- a/recipes/recipe_modules/git/examples/full.expected/remote_not_origin.json +++ b/recipes/recipe_modules/git/examples/full.expected/remote_not_origin.json @@ -18,7 +18,7 @@ "git", "fetch", "not_origin", - "HEAD", + "master", "--recurse-submodules", "--progress" ], diff --git a/recipes/recipe_modules/git/examples/full.expected/set_got_revision.json b/recipes/recipe_modules/git/examples/full.expected/set_got_revision.json index b3e4a83335..05b0fd46b5 100644 --- a/recipes/recipe_modules/git/examples/full.expected/set_got_revision.json +++ b/recipes/recipe_modules/git/examples/full.expected/set_got_revision.json @@ -16,7 +16,7 @@ "git", "fetch", "origin", - "HEAD", + "master", "--recurse-submodules", "--progress" ],