code: def test_save_to_git(path=None):
      ds = Dataset(path).create(result_renderer="disabled")
      create_tree(
          ds.path,
          {
              "file_ingit": "file_ingit",
              "file_inannex": "file_inannex",
          },
      )
      ds.repo.save(paths=["file_ingit"], git=True)
      ds.repo.save(paths=["file_inannex"])
      assert_repo_status(ds.repo)
      for f, p in get_annexstatus(ds.repo).items():
          eq_(p["state"], "clean")
          if f.match("*ingit"):
              assert_not_in("key", p, f)
          elif f.match("*inannex"):
              assert_in("key", p, f)
  
file_path: datalad/datalad/support/tests/test_repo_save.py
imports: import shutil
  from datalad.api import create
  from datalad.distribution.dataset import Dataset
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.gitrepo import GitRepo
  from datalad.tests.utils_pytest import assert_in, assert_in_results, assert_not_in, assert_repo_status, create_tree, eq_, get_annexstatus, get_convoluted_situation, known_failure_windows, slow, with_tempfile
  from datalad.utils import on_windows, rmtree
label_desc: Use image node_id 6 for calling a global function with example usage: test_save_to_git(path) without return types