isRepoDirty() — tailwindcss Function Reference
Architecture documentation for the isRepoDirty() function in git.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD e7b1089c_877d_2e3e_9622_6f5ac99ca7ba["isRepoDirty()"] 3c7d5283_a874_1372_cf03_3576a82afd9f["git.ts"] e7b1089c_877d_2e3e_9622_6f5ac99ca7ba -->|defined in| 3c7d5283_a874_1372_cf03_3576a82afd9f 817bb61a_7ad0_1186_790a_6a40126eed80["run()"] 817bb61a_7ad0_1186_790a_6a40126eed80 -->|calls| e7b1089c_877d_2e3e_9622_6f5ac99ca7ba style e7b1089c_877d_2e3e_9622_6f5ac99ca7ba 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, defined in packages/@tailwindcss-upgrade/src/utils/git.ts.
Where is isRepoDirty() defined?
isRepoDirty() is defined in packages/@tailwindcss-upgrade/src/utils/git.ts at line 3.
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