isRepoDirty() — tailwindcss Function Reference
Architecture documentation for the isRepoDirty() function in git.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 92c23351_d4b7_2db4_5496_013b2f5d8883["isRepoDirty()"] c1db9de2_3654_d42b_b9f2_1c5a0ccbd307["run()"] c1db9de2_3654_d42b_b9f2_1c5a0ccbd307 -->|calls| 92c23351_d4b7_2db4_5496_013b2f5d8883 style 92c23351_d4b7_2db4_5496_013b2f5d8883 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/@tailwindcss-upgrade/src/utils/git.ts lines 3–17
export function isRepoDirty(cwd?: string) {
try {
let stdout = execSync('git status --porcelain', { encoding: 'utf-8', cwd })
return stdout.trim() !== ''
} catch (error) {
// If it's not a git repository we don't know if it's dirty or not. But we
// also don't want to block the migration. Maybe we can still fail and
// require a `--force` flag?
if (error?.toString?.().includes('not a git repository')) {
return false
}
return true
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does isRepoDirty() do?
isRepoDirty() is a function in the tailwindcss codebase.
What calls isRepoDirty()?
isRepoDirty() is called by 1 function(s): run.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free