From 9404d187f2d645435fbbbe35982e488851f83ee8 Mon Sep 17 00:00:00 2001 From: "Alex Pooley (@zuedev)" Date: Mon, 25 May 2026 09:08:11 +0100 Subject: add old content --- scripts/powershell/Get-GitDirty.ps1 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 scripts/powershell/Get-GitDirty.ps1 (limited to 'scripts/powershell/Get-GitDirty.ps1') diff --git a/scripts/powershell/Get-GitDirty.ps1 b/scripts/powershell/Get-GitDirty.ps1 new file mode 100644 index 0000000..9216ef2 --- /dev/null +++ b/scripts/powershell/Get-GitDirty.ps1 @@ -0,0 +1,19 @@ +<# +.SYNOPSIS + Lists immediate subdirectories containing git repositories with pending changes. + +.DESCRIPTION + This script scans all depth-1 directories in the current location. + It filters for valid git repositories and checks if 'git status' returns any output. + Only the names of repositories with uncommitted changes (dirty) are returned. + +.EXAMPLE + PS C:\MyProjects> Get-GitDirty + + Returns a list of folder names that have pending changes. +#> + +Get-ChildItem -Directory | +Where-Object { Test-Path "$($_.FullName)\.git" } | +Where-Object { git -C $_.FullName status --porcelain } | +Select-Object Name \ No newline at end of file -- cgit v1.2.3