myrepos: a wip action to find unfinished work 0 ▲ ¬ just serendipity 🍀 1 hour ago · Tech · hide · 0 comments Previously. Problem statement: I manage a few dozen repos via myrepos (mr), and I wanted a single command to show which ones have work in progress (“WIP”) — uncommitted changes, dirty staging area, stray branches and alike. I want essentially a filtered version of mr ls. So I defined my own command. A repo is not WIP when all three hold: the default branch is checked out; no other local branches exist; and the working tree is fully clean. Anything else gets flagged with a reason. The definition: # List repos with work in progress: not on default branch, extra local branches, or dirty tree. # Run as `mr -m wip`: the -m (minimal) flag drops mr's per-repo "mr wip:" header and blank # lines, leaving only the flagged repos. This cannot be defaulted per-action (mr only honors # -m/-q as CLI flags, not via config). wip = reasons="" cur=$(git symbolic-ref --quiet --short HEAD 2>/dev/null || echo "(detached)") def=$(git symbolic-ref --quiet --short refs/remotes/origin/HEAD 2>/dev/null | sed… No comments yet. Log in to reply on the Fediverse. Comments will appear here.