diff --git a/CHANGELOG.md b/CHANGELOG.md index 133bea1c69f..aa5e6f67bd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Auto-generated CTEs in tests and ephemeral models have lowercase names to comply with dbt coding conventions ([#3027](https://github.com/fishtown-analytics/dbt/issues/3027), [#3028](https://github.com/fishtown-analytics/dbt/issues/3028)) - Fix incorrect error message when a selector does not match any node [#3036](https://github.com/fishtown-analytics/dbt/issues/3036)) - Fix variable `_dbt_max_partition` declaration and initialization for BigQuery incremental models ([#2940](https://github.com/fishtown-analytics/dbt/issues/2940), [#2976](https://github.com/fishtown-analytics/dbt/pull/2976)) +- Moving from 'master' to 'HEAD' default branch in git ([#3057](https://github.com/fishtown-analytics/dbt/issues/3057)) ### Features - Add optional configs for `require_partition_filter` and `partition_expiration_days` in BigQuery ([#1843](https://github.com/fishtown-analytics/dbt/issues/1843), [#2928](https://github.com/fishtown-analytics/dbt/pull/2928)) @@ -21,6 +22,7 @@ Contributors: - [@NiallRees](https://github.com/NiallRees) ([#3028](https://github.com/fishtown-analytics/dbt/pull/3028)) - [ran-eh](https://github.com/ran-eh) ([#3036](https://github.com/fishtown-analytics/dbt/pull/3036)) - [@pcasteran](https://github.com/pcasteran) ([#2976](https://github.com/fishtown-analytics/dbt/pull/2976)) +- [@VasiliiSurov](https://github.com/VasiliiSurov) ([#3104](https://github.com/fishtown-analytics/dbt/pull/3104)) ## dbt 0.19.1 (Release TBD) diff --git a/core/dbt/clients/git.py b/core/dbt/clients/git.py index dc3b573c0e7..0bbf937d42d 100644 --- a/core/dbt/clients/git.py +++ b/core/dbt/clients/git.py @@ -52,7 +52,7 @@ def _checkout(cwd, repo, branch): def checkout(cwd, repo, branch=None): if branch is None: - branch = 'master' + branch = 'HEAD' try: return _checkout(cwd, repo, branch) except dbt.exceptions.CommandResultError as exc: diff --git a/core/dbt/deps/git.py b/core/dbt/deps/git.py index b8018e1bb07..f5c05576f15 100644 --- a/core/dbt/deps/git.py +++ b/core/dbt/deps/git.py @@ -72,7 +72,7 @@ def _checkout(self): def _fetch_metadata(self, project, renderer) -> ProjectPackageMetadata: path = self._checkout() - if self.revision == 'master' and self.warn_unpinned: + if self.revision == 'HEAD' and self.warn_unpinned: warn_or_error( 'The git package "{}" is not pinned.\n\tThis can introduce ' 'breaking changes into your project without warning!\n\nSee {}' @@ -133,7 +133,7 @@ def incorporate( def resolved(self) -> GitPinnedPackage: requested = set(self.revisions) if len(requested) == 0: - requested = {'master'} + requested = {'HEAD'} elif len(requested) > 1: raise_dependency_error( 'git dependencies should contain exactly one version. ' diff --git a/test/unit/test_deps.py b/test/unit/test_deps.py index 4741a77e1bb..e4fcda2ba14 100644 --- a/test/unit/test_deps.py +++ b/test/unit/test_deps.py @@ -104,7 +104,7 @@ def test_default_revision(self): a_pinned = a.resolved() self.assertEqual(a_pinned.name, 'http://example.com') - self.assertEqual(a_pinned.get_version(), 'master') + self.assertEqual(a_pinned.get_version(), 'HEAD') self.assertEqual(a_pinned.source_type(), 'git') self.assertIs(a_pinned.warn_unpinned, True)