internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: iterative/dvc

Issue:
dvc add absolute_path
`~/repo$ dvc add $HOME/repo/file` should realise that the file is not "external" and add it as a relative path rather than absolute.


Discussion:

Resolving patch:
diff --git a/dvc/output/local.py b/dvc/output/local.py
--- a/dvc/output/local.py
+++ b/dvc/output/local.py
@@ -18,6 +18,12 @@ class OutputLOCAL(OutputBase):
     REMOTE = RemoteLOCAL
     sep = os.sep
 
+    def __init__(self, stage, path, *args, **kwargs):
+        if stage and path_isin(path, stage.repo.root_dir):
+            path = relpath(path, stage.wdir)
+
+        super().__init__(stage, path, *args, **kwargs)
+
     def _parse_path(self, remote, path):
         parsed = urlparse(path)
         if parsed.scheme == "remote":


Test patch:
diff --git a/tests/func/test_add.py b/tests/func/test_add.py
--- a/tests/func/test_add.py
+++ b/tests/func/test_add.py
@@ -216,7 +216,7 @@ def test(self):
         self.assertEqual(ret, 0)
 
         d = load_stage_file("bar.dvc")
-        self.assertEqual(d["outs"][0]["path"], bar)
+        self.assertEqual(d["outs"][0]["path"], self.BAR)
 
 
 class TestCmdAdd(TestDvc):
diff --git a/tests/unit/output/test_local.py b/tests/unit/output/test_local.py
--- a/tests/unit/output/test_local.py
+++ b/tests/unit/output/test_local.py
@@ -42,13 +42,28 @@ def test_str_workdir_inside_repo(dvc):
     assert os.path.join("some_folder", "path") == str(output)
 
 
-def test_str_on_absolute_path(dvc):
+def test_str_on_local_absolute_path(dvc):
     stage = Stage(dvc)
 
-    path = os.path.abspath(os.path.join("path", "to", "file"))
-    output = OutputLOCAL(stage, path, cache=False)
+    rel_path = os.path.join("path", "to", "file")
+    abs_path = os.path.abspath(rel_path)
+    output = OutputLOCAL(stage, abs_path, cache=False)
 
-    assert path == str(output)
+    assert output.def_path == rel_path
+    assert output.path_info.fspath == abs_path
+    assert str(output) == rel_path
+
+
+def test_str_on_external_absolute_path(dvc):
+    stage = Stage(dvc)
+
+    rel_path = os.path.join("..", "path", "to", "file")
+    abs_path = os.path.abspath(rel_path)
+    output = OutputLOCAL(stage, abs_path, cache=False)
+
+    assert output.def_path == abs_path
+    assert output.path_info.fspath == abs_path
+    assert str(output) == abs_path
 
 
 class TestGetFilesNumber(TestDvc):
Repository: iterative/dvc

Issue:
perf: `_find_all_targets()` has quadratic complexity because of `Git.is_tracked()`
`Git.is_tracked()` recreates a list of tracked files for each call and is called for each file `walk_files()` will find. Both lists are proportional to repo size, which makes `_find_all_targets() ~ O(repo_size ** 2)`.


Discussion:
https://github.com/iterative/dvc/blob/0.77.3/dvc/scm/git/__init__.py#L236
There should be a way to access git index by name and thus implement `Git.is_tracked()` in `O(1)`, making things linear overall.

Resolving patch:
diff --git a/dvc/scm/git/__init__.py b/dvc/scm/git/__init__.py
--- a/dvc/scm/git/__init__.py
+++ b/dvc/scm/git/__init__.py
@@ -229,7 +229,8 @@ def is_tracked(self, path):
         # it is equivalent to `bool(self.repo.git.ls_files(path))` by
         # functionality, but ls_files fails on unicode filenames
         path = relpath(path, self.root_dir)
-        return path in [i[0] for i in self.repo.index.entries]
+        # There are 4 stages, see BaseIndexEntry.stage
+        return any((path, i) in self.repo.index.entries for i in (0, 1, 2, 3))
 
     def is_dirty(self):
         return self.repo.is_dirty()


Test patch:
Repository: iterative/dvc

Issue:
dvc: fix version generatio
Looks like dynamic version got broken https://travis-ci.com/iterative/dvc/jobs/274986530 .



Discussion:
Yep, looks broken.

```console
$ git checkout 0.80.0
$ dvc --version
0.80.0
$ git checkout 0.81.0
$ dvc --version
0.81.0+fe635a
```

Will take a look

Resolving patch:
diff --git a/dvc/version.py b/dvc/version.py
--- a/dvc/version.py
+++ b/dvc/version.py
@@ -49,7 +49,7 @@ def _is_release(dir_path, base_version):
             ["git", "describe", "--tags", "--exact-match"],
             cwd=dir_path,
             stderr=subprocess.STDOUT,
-        )
+        ).decode("utf-8")
         tag = output.strip()
         return tag == base_version
     except subprocess.CalledProcessError:


Test patch:
diff --git a/tests/unit/test_version.py b/tests/unit/test_version.py
--- a/tests/unit/test_version.py
+++ b/tests/unit/test_version.py
@@ -12,10 +12,10 @@ def test_is_release():
         assert ret is False
 
         m.side_effect = None
-        m.return_value = dvc.version._BASE_VERSION
+        m.return_value = dvc.version._BASE_VERSION.encode("ascii")
         ret = dvc.version._is_release(None, dvc.version._BASE_VERSION)
         assert ret
 
-        m.return_value = "630d1741c2d5dd89a3176bd15b63121b905d35c9"
+        m.return_value = b"630d1741c2d5dd89a3176bd15b63121b905d35c9"
         ret = dvc.version._is_release(None, dvc.version._BASE_VERSION)
         assert ret is False
Repository: iterative/dvc

Issue:
api: inline documentation (docstrings)
I don't think we use docstrings much since the code is meant to be self-documenting for developers.

However, for `dvc.api` (currently a single file: https://github.com/iterative/dvc/blob/master/dvc/api.py) I think we should have significant code documentation (multi-line file and function [docstrings](https://www.python.org/dev/peps/pep-0257/#id17), other comments).

Let's find a good docstring format we want to use and maintain e.g. [Sphinx](https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html)?

- [ ] Should probably also work on iterative/dvcx/issues/1 along with this one.


Discussion:

Resolving patch:
diff --git a/dvc/api.py b/dvc/api.py
--- a/dvc/api.py
+++ b/dvc/api.py
@@ -55,7 +55,11 @@ def __init__(self, url):
 
 
 def get_url(path, repo=None, rev=None, remote=None):
-    """Returns an url of a resource specified by path in repo"""
+    """
+    Returns the full URL to the data artifact specified by its `path` in a
+    `repo`.
+    NOTE: There is no guarantee that the file actually exists in that location.
+    """
     try:
         with _make_repo(repo, rev=rev) as _repo:
             abspath = os.path.join(_repo.root_dir, path)
@@ -67,7 +71,7 @@ def get_url(path, repo=None, rev=None, remote=None):
 
 
 def open(path, repo=None, rev=None, remote=None, mode="r", encoding=None):
-    """Opens a specified resource as a file descriptor"""
+    """Context manager to open a file artifact as a file object."""
     args = (path,)
     kwargs = {
         "repo": repo,
@@ -86,7 +90,7 @@ def __init__(self, func, args, kwds):
 
     def __getattr__(self, name):
         raise AttributeError(
-            "dvc.api.open() should be used in a with statement"
+            "dvc.api.open() should be used in a with statement."
         )
 
 
@@ -100,7 +104,7 @@ def _open(path, repo=None, rev=None, remote=None, mode="r", encoding=None):
 
 
 def read(path, repo=None, rev=None, remote=None, mode="r", encoding=None):
-    """Read a specified resource into string"""
+    """Returns the contents of a file artifact."""
     with open(
         path, repo=repo, rev=rev, remote=remote, mode=mode, encoding=encoding
     ) as fd:
@@ -110,7 +114,9 @@ def read(path, repo=None, rev=None, remote=None, mode="r", encoding=None):
 @contextmanager
 def _make_repo(repo_url, rev=None):
     if not repo_url or os.path.exists(repo_url):
-        assert rev is None, "Custom revision is not supported for local repo"
+        assert (
+            rev is None
+        ), "Git revisions are not supported for local DVC projects."
         yield Repo(repo_url)
     else:
         with external_repo(url=repo_url, rev=rev) as repo:
@@ -118,7 +124,7 @@ def _make_repo(repo_url, rev=None):
 
 
 def summon(name, repo=None, rev=None, summon_file="dvcsummon.yaml", args=None):
-    """Instantiate an object described in the summon file."""
+    """Instantiate an object described in the `summon_file`."""
     with prepare_summon(
         name, repo=repo, rev=rev, summon_file=summon_file
     ) as desc:


Test patch:
Repository: iterative/dvc

Issue:
remote: allow modifying only existing entries
**DVC version**: `0.81.0`

Using `dvc remote modify` on a non-existing entry creates an invalid remote configuration, since it creates a remote without a URL.

```bash
dvc init --no-scm
dvc remote modify missing <option> <value>
```

Ideally, raising an error should prevent the user from introducing an invalid remote entry.

[Discord discussion](https://discordapp.com/channels/485586884165107732/485596304961962003/666411899499315221)


Discussion:

Resolving patch:
diff --git a/dvc/remote/config.py b/dvc/remote/config.py
--- a/dvc/remote/config.py
+++ b/dvc/remote/config.py
@@ -3,8 +3,7 @@
 import posixpath
 from urllib.parse import urlparse
 
-from dvc.config import Config
-from dvc.config import ConfigError
+from dvc.config import Config, ConfigError
 from dvc.utils import relpath
 
 
@@ -134,6 +133,8 @@ def remove(self, name, level=None):
                 break
 
     def modify(self, name, option, value, level=None):
+        self.get_settings(name)
+
         self.config.set(
             Config.SECTION_REMOTE_FMT.format(name), option, value, level=level
         )


Test patch:
diff --git a/tests/func/test_remote.py b/tests/func/test_remote.py
--- a/tests/func/test_remote.py
+++ b/tests/func/test_remote.py
@@ -6,7 +6,7 @@
 import pytest
 from mock import patch
 
-from dvc.config import Config
+from dvc.config import Config, ConfigError
 from dvc.exceptions import DownloadError, UploadError
 from dvc.main import main
 from dvc.path_info import PathInfo
@@ -31,10 +31,10 @@ def test(self):
 
         self.assertEqual(main(["remote", "list"]), 0)
 
-        self.assertEqual(main(["remote", "remove", remotes[0]]), 0)
         self.assertEqual(
             main(["remote", "modify", remotes[0], "option", "value"]), 0
         )
+        self.assertEqual(main(["remote", "remove", remotes[0]]), 0)
 
         self.assertEqual(main(["remote", "list"]), 0)
 
@@ -250,3 +250,10 @@ def test_raise_on_too_many_open_files(tmp_dir, dvc, tmp_path_factory, mocker):
     with pytest.raises(OSError) as e:
         dvc.push()
         assert e.errno == errno.EMFILE
+
+
+def test_modify_missing_remote(dvc):
+    remote_config = RemoteConfig(dvc.config)
+
+    with pytest.raises(ConfigError, match=r"unable to find remote section"):
+        remote_config.modify("myremote", "gdrive_client_id", "xxx")
Repository: iterative/dvc

Issue:
gdrive: cached files corruption on pull
Pulling from gdrive remote can cause cached files corruption.



Discussion:

Resolving patch:
diff --git a/dvc/remote/gdrive.py b/dvc/remote/gdrive.py
--- a/dvc/remote/gdrive.py
+++ b/dvc/remote/gdrive.py
@@ -261,8 +261,11 @@ def create_remote_dir(self, parent_id, title):
     def get_remote_item(self, name, parents_ids):
         if not parents_ids:
             return None
-        query = " or ".join(
-            "'{}' in parents".format(parent_id) for parent_id in parents_ids
+        query = "({})".format(
+            " or ".join(
+                "'{}' in parents".format(parent_id)
+                for parent_id in parents_ids
+            )
         )
 
         query += " and trashed=false and title='{}'".format(name)
@@ -331,8 +334,10 @@ def all(self):
         if not self.cached_ids:
             return
 
-        query = " or ".join(
-            "'{}' in parents".format(dir_id) for dir_id in self.cached_ids
+        query = "({})".format(
+            " or ".join(
+                "'{}' in parents".format(dir_id) for dir_id in self.cached_ids
+            )
         )
 
         query += " and trashed=false"


Test patch:
Repository: iterative/dvc

Issue:
push: improve 'no remote specified hint
> More context around https://discordapp.com/channels/485586884165107732/563406153334128681/666010834702696450

```console
$ dvc version
DVC version: 0.80.0
Python version: 3.7.6
Platform: Darwin-19.0.0-x86_64-i386-64bit
Binary: False
Package: brew

$ dvc init --no-scm
...
$ dvc push
ERROR: failed to push data to the cloud - config file error: no remote specified. Setup default remote with
    dvc config core.remote <name>
or use:
    dvc push -r <name>



Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
```
- ✅  `config file error: no remote specified`: OK, this is the problem.
- ❌  `Setup default remote with... or use...`: Oops, actually I haven't even setup a remote. Maybe the hint should be different in this case?
- ❓  There 3 new lines between the hint and `Having any troubles? ...`


Discussion:
May also affect other sync commands (`pull`, `fetch`).

Resolving patch:
diff --git a/dvc/config.py b/dvc/config.py
--- a/dvc/config.py
+++ b/dvc/config.py
@@ -24,15 +24,7 @@ def __init__(self, msg):
 
 
 class NoRemoteError(ConfigError):
-    def __init__(self, command):
-        msg = (
-            "no remote specified. Setup default remote with\n"
-            "    dvc remote default <name>\n"
-            "or use:\n"
-            "    dvc {} -r <name>\n".format(command)
-        )
-
-        super().__init__(msg)
+    pass
 
 
 def supported_cache_type(types):
diff --git a/dvc/data_cloud.py b/dvc/data_cloud.py
--- a/dvc/data_cloud.py
+++ b/dvc/data_cloud.py
@@ -39,7 +39,26 @@ def get_remote(self, remote=None, command="<command>"):
         if remote:
             return self._init_remote(remote)
 
-        raise NoRemoteError(command)
+        has_non_default_remote = bool(
+            self.repo.config.list_options(
+                Config.SECTION_REMOTE_REGEX, Config.SECTION_REMOTE_URL
+            )
+        )
+
+        if has_non_default_remote:
+            error_msg = (
+                "no remote specified. Setup default remote with\n"
+                "    dvc remote default <remote name>\n"
+                "or use:\n"
+                "    dvc {} -r <remote name>".format(command)
+            )
+        else:
+            error_msg = (
+                "no remote specified. Create a default remote with\n"
+                "    dvc remote add -d <remote name> <remote url>"
+            )
+
+        raise NoRemoteError(error_msg)
 
     def _init_remote(self, remote):
         return Remote(self.repo, name=remote)


Test patch:
Repository: iterative/dvc

Issue:
git hook post-checkout does not work as expected 
Hi, 
The best procedure to reproduce the bug is following step 4 of basic scenarios, versioning:
https://katacoda.com/dvc/courses/basics/versioning

It is expected that git checkout automatically triggers dvc checkout so the file.txt is restored to proper version which was committed, but it does not and `cat file.txt` gives `test 3` after every checkout. `dvc install` has successfully installed the hooks, I checked, but I do not know if the tutorial is wrong or the hook is not working properly.  


Discussion:
Yep, was able to reproduce. It can be skipped to the step 4 directly to reproduce this.
@shcheklein Thanks for approval. 
For the record, it is caused by my recent change to post-checkout hook, which accounted for branches but didn't account for tags properly :slightly_frowning_face: I will look into it soon. Thanks for the feedback!

Resolving patch:
diff --git a/dvc/scm/git/__init__.py b/dvc/scm/git/__init__.py
--- a/dvc/scm/git/__init__.py
+++ b/dvc/scm/git/__init__.py
@@ -275,9 +275,10 @@ def install(self):
             [
                 # checking out some reference and not specific file.
                 '[ "$3" = "1" ]',
-                # check that we are on some branch/tag and not in detached HEAD
-                # state, so we don't accidentally break a rebase.
-                '[ "$(git rev-parse --abbrev-ref HEAD)" != "HEAD" ]',
+                # make sure we are not in the middle of a rebase/merge, so we
+                # don't accidentally break it with an unsuccessful checkout.
+                # Note that git hooks are always running in repo root.
+                "[ ! -d .git/rebase-merge ]",
             ],
             "checkout",
         )


Test patch:
Repository: iterative/dvc

Issue:
`dvc add` print not quote-wrapped file-paths if they contain spaces
dvc 0.82.8
installed via yum
centos 7

Some of our, khm, windows-users put files in project with spaces in names.
In this case `dvc add`, when prints hint-command `git add blah-blah`, not wrap path with quotes so copy-paste this hint-command not working ofc.




Discussion:
Off topic: Makes me think if we should re-consider auto `git add`ing files. :thinking: 

Resolving patch:
diff --git a/dvc/scm/git/__init__.py b/dvc/scm/git/__init__.py
--- a/dvc/scm/git/__init__.py
+++ b/dvc/scm/git/__init__.py
@@ -3,6 +3,7 @@
 import logging
 import os
 import yaml
+import shlex
 
 from funcy import cached_property
 from pathspec.patterns import GitWildMatchPattern
@@ -321,11 +322,13 @@ def remind_to_track(self):
         if not self.files_to_track:
             return
 
+        files = " ".join(shlex.quote(path) for path in self.files_to_track)
+
         logger.info(
             "\n"
             "To track the changes with git, run:\n"
             "\n"
-            "\tgit add {files}".format(files=" ".join(self.files_to_track))
+            "\tgit add {files}".format(files=files)
         )
 
     def track_file(self, path):


Test patch:
diff --git a/tests/unit/scm/test_scm.py b/tests/unit/scm/test_scm.py
--- a/tests/unit/scm/test_scm.py
+++ b/tests/unit/scm/test_scm.py
@@ -37,3 +37,9 @@ def test_should_throw_and_cleanup(self):
 
         self.assertEqual(0, self.scm_mock.reset_ignores.call_count)
         self.assertEqual(0, self.scm_mock.remind_to_track.call_count)
+
+
+def test_remind_to_track(scm, caplog):
+    scm.files_to_track = ["fname with spaces.txt", "тест", "foo"]
+    scm.remind_to_track()
+    assert "git add 'fname with spaces.txt' 'тест' foo" in caplog.text
Repository: iterative/dvc

Issue:
missing progress
any reason why `no_progress_bar=True` in these three places?

- `remote.gdrive.RemoteGDrive.gdrive_upload_file()`
  + from e7227898e4e10a1 by @MaxRis
- `remote.base.RemoteBASE._get_dir_info_checksum():self.cache.upload()`
  + from 00cfb04fea04694 by @efiop
- `remote.gs.RemoteGDrive.RemoteGS._upload()` and `_download()`
  + from 28b99dc4c78a7bc by, er, @casperdcl

(related: #3060)
ui: fix missing progress & tidy
accidentally created because of https://github.com/cli/cli/issues/392
missing progress
any reason why `no_progress_bar=True` in these three places?

- `remote.gdrive.RemoteGDrive.gdrive_upload_file()`
  + from e7227898e4e10a1 by @MaxRis
- `remote.base.RemoteBASE._get_dir_info_checksum():self.cache.upload()`
  + from 00cfb04fea04694 by @efiop
- `remote.gs.RemoteGDrive.RemoteGS._upload()` and `_download()`
  + from 28b99dc4c78a7bc by, er, @casperdcl

(related: #3060)


Discussion:
@casperdcl both places in `gdrive` and `gs` remotes expect `no_progress_bar` value to be passed from `RemoteBase` class. Default `True` values seems are only the preference to be silent by default if internal methods will be reused in future by `gdrive` or `gs`.

@casperdcl both places in `gdrive` and `gs` remotes expect `no_progress_bar` value to be passed from `RemoteBase` class. Default `True` values seems are only the preference to be silent by default if internal methods will be reused in future by `gdrive` or `gs`.

Resolving patch:
diff --git a/dvc/remote/gdrive.py b/dvc/remote/gdrive.py
--- a/dvc/remote/gdrive.py
+++ b/dvc/remote/gdrive.py
@@ -246,7 +246,7 @@ def gdrive_upload_file(
         self,
         parent_id,
         title,
-        no_progress_bar=True,
+        no_progress_bar=False,
         from_file="",
         progress_name="",
     ):
diff --git a/dvc/remote/gs.py b/dvc/remote/gs.py
--- a/dvc/remote/gs.py
+++ b/dvc/remote/gs.py
@@ -51,7 +51,7 @@ def _upload_to_bucket(
     to_info,
     chunk_size=None,
     name=None,
-    no_progress_bar=True,
+    no_progress_bar=False,
 ):
     blob = bucket.blob(to_info.path, chunk_size=chunk_size)
     with io.open(from_file, mode="rb") as fobj:
@@ -166,7 +166,7 @@ def exists(self, path_info):
         """
         return self.isfile(path_info) or self.isdir(path_info)
 
-    def _upload(self, from_file, to_info, name=None, no_progress_bar=True):
+    def _upload(self, from_file, to_info, name=None, no_progress_bar=False):
         bucket = self.gs.bucket(to_info.bucket)
         _upload_to_bucket(
             bucket,
@@ -176,7 +176,7 @@ def _upload(self, from_file, to_info, name=None, no_progress_bar=True):
             no_progress_bar=no_progress_bar,
         )
 
-    def _download(self, from_info, to_file, name=None, no_progress_bar=True):
+    def _download(self, from_info, to_file, name=None, no_progress_bar=False):
         bucket = self.gs.bucket(from_info.bucket)
         blob = bucket.get_blob(from_info.path)
         with io.open(to_file, mode="wb") as fobj:


Test patch:
Repository: iterative/dvc

Issue:
dvc disables logging of other packages
DVC version is 0.80.0 and I am running Linux. The package was installed from AUR

To reproduce the issue run the following few lines of code
```
import logging

LOGGER = logging.getLogger(__name__)

print(LOGGER.disabled)

import dvc
print(LOGGER.disabled)
```

which will output
```
False
True
```

The reason for this is the usage of `logging.config.dictConfig` [here](https://github.com/iterative/dvc/blob/19edc1ab1d2020711c43f8bb9ad58930c74802f6/dvc/logger.py#L147) without adding `"disable_existing_loggers": False` to the dict


Discussion:

Resolving patch:
diff --git a/dvc/logger.py b/dvc/logger.py
--- a/dvc/logger.py
+++ b/dvc/logger.py
@@ -141,6 +141,13 @@ def _stack_trace(exc_info):
     )
 
 
+def disable_other_loggers():
+    root = logging.root
+    for (logger_name, logger) in root.manager.loggerDict.items():
+        if logger_name != "dvc" and not logger_name.startswith("dvc."):
+            logger.disabled = True
+
+
 def setup(level=logging.INFO):
     colorama.init()
 
@@ -183,22 +190,7 @@ def setup(level=logging.INFO):
                         "console_errors",
                     ],
                 },
-                "paramiko": {
-                    "level": logging.CRITICAL,
-                    "handlers": [
-                        "console_info",
-                        "console_debug",
-                        "console_errors",
-                    ],
-                },
-                "flufl.lock": {
-                    "level": logging.CRITICAL,
-                    "handlers": [
-                        "console_info",
-                        "console_debug",
-                        "console_errors",
-                    ],
-                },
             },
+            "disable_existing_loggers": False,
         }
     )
diff --git a/dvc/main.py b/dvc/main.py
--- a/dvc/main.py
+++ b/dvc/main.py
@@ -9,7 +9,7 @@
 from dvc.exceptions import DvcParserError
 from dvc.exceptions import NotDvcRepoError
 from dvc.external_repo import clean_repos
-from dvc.logger import FOOTER
+from dvc.logger import disable_other_loggers, FOOTER
 from dvc.utils import format_link
 from dvc.remote.pool import close_pools
 
@@ -34,6 +34,7 @@ def main(argv=None):
     """
     args = None
     cmd = None
+    disable_other_loggers()
 
     outerLogLevel = logger.level
     try:


Test patch:
diff --git a/tests/dir_helpers.py b/tests/dir_helpers.py
--- a/tests/dir_helpers.py
+++ b/tests/dir_helpers.py
@@ -45,12 +45,12 @@
 
 import os
 import pathlib
-import logging
 from contextlib import contextmanager
 
 import pytest
 from funcy import lmap, retry
 
+from dvc.logger import disable_other_loggers
 from dvc.utils.fs import makedirs
 from dvc.compat import fspath, fspath_py35
 
@@ -67,8 +67,7 @@
 
 
 # see https://github.com/iterative/dvc/issues/3167
-git_logger = logging.getLogger("git")
-git_logger.setLevel(logging.CRITICAL)
+disable_other_loggers()
 
 
 class TmpDir(pathlib.Path):