Home / Function/ stops_at_git_dir() — tailwindcss Function Reference

stops_at_git_dir() — tailwindcss Function Reference

Architecture documentation for the stops_at_git_dir() function in dir.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  4619da9f_01ed_b3e9_fac8_eb5ac7c3baec["stops_at_git_dir()"]
  1d8e185d_2d17_16a2_e6da_31f5e5c71648["tmpdir()"]
  4619da9f_01ed_b3e9_fac8_eb5ac7c3baec -->|calls| 1d8e185d_2d17_16a2_e6da_31f5e5c71648
  b23c536f_df64_0c16_7823_c6333e8bd192["mkdirp()"]
  4619da9f_01ed_b3e9_fac8_eb5ac7c3baec -->|calls| b23c536f_df64_0c16_7823_c6333e8bd192
  a3791d58_6294_cb66_0418_5756e23761fd["path()"]
  4619da9f_01ed_b3e9_fac8_eb5ac7c3baec -->|calls| a3791d58_6294_cb66_0418_5756e23761fd
  b531cfc0_8a2c_1d41_6f18_1d84e771a9ef["wfile()"]
  4619da9f_01ed_b3e9_fac8_eb5ac7c3baec -->|calls| b531cfc0_8a2c_1d41_6f18_1d84e771a9ef
  386bbf62_59b6_b5e0_c202_c2ecee5729ec["build()"]
  4619da9f_01ed_b3e9_fac8_eb5ac7c3baec -->|calls| 386bbf62_59b6_b5e0_c202_c2ecee5729ec
  7f3cd9fa_fc0e_11d8_c82c_d766c339923a["add_child()"]
  4619da9f_01ed_b3e9_fac8_eb5ac7c3baec -->|calls| 7f3cd9fa_fc0e_11d8_c82c_d766c339923a
  22918057_f3e8_c59b_6372_a4375af46acd["matched()"]
  4619da9f_01ed_b3e9_fac8_eb5ac7c3baec -->|calls| 22918057_f3e8_c59b_6372_a4375af46acd
  style 4619da9f_01ed_b3e9_fac8_eb5ac7c3baec fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/ignore/src/dir.rs lines 1156–1176

    fn stops_at_git_dir() {
        // This tests that .gitignore files beyond a .git barrier aren't
        // matched, but .ignore files are.
        let td = tmpdir();
        mkdirp(td.path().join(".git"));
        mkdirp(td.path().join("foo/.git"));
        wfile(td.path().join(".gitignore"), "foo");
        wfile(td.path().join(".ignore"), "bar");

        let ig0 = IgnoreBuilder::new().build();
        let (ig1, err) = ig0.add_child(td.path());
        assert!(err.is_none());
        let (ig2, err) = ig1.add_child(ig1.path().join("foo"));
        assert!(err.is_none());

        assert!(ig1.matched("foo", false).is_ignore());
        assert!(ig2.matched("foo", false).is_none());

        assert!(ig1.matched("bar", false).is_ignore());
        assert!(ig2.matched("bar", false).is_ignore());
    }

Subdomains

Frequently Asked Questions

What does stops_at_git_dir() do?
stops_at_git_dir() is a function in the tailwindcss codebase.
What does stops_at_git_dir() call?
stops_at_git_dir() calls 7 function(s): add_child, build, matched, mkdirp, path, tmpdir, wfile.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free