mirror of
https://github.com/tedkulp/dotfiles
synced 2026-03-04 13:29:57 -05:00
refactor(git): improve branch parsing logic
Refactor the logic used to determine local branches considered 'gone' in custom Git commands. Ensure proper handling of branches that are checked out in worktrees.
This commit is contained in:
@@ -44,9 +44,9 @@
|
|||||||
dlb = "dead-local-branches"
|
dlb = "dead-local-branches"
|
||||||
ddlb = "delete-dead-local-branches"
|
ddlb = "delete-dead-local-branches"
|
||||||
fdlb = "force-delete-dead-local-branches"
|
fdlb = "force-delete-dead-local-branches"
|
||||||
dead-local-branches = "!git branch -vv | grep ': gone]'| grep -v '\\*' | awk '{ print $1; }'"
|
dead-local-branches = "!git branch -vv | grep ': gone]'| grep -v '\\*' | awk '{ if ($1 == \"+\") print $2; else print $1; }'"
|
||||||
delete-dead-local-branches = "!git branch -vv | grep ': gone]'| grep -v '\\*' | awk '{ print $1; }' | xargs -r git branch -d"
|
delete-dead-local-branches = "!git branch -vv | grep ': gone]'| grep -v '\\*' | awk '{ if ($1 == \"+\") print $2; else print $1; }' | xargs -r git branch -d"
|
||||||
force-delete-dead-local-branches = "!git branch -vv | grep ': gone]'| grep -v '\\*' | awk '{ print $1; }' | xargs -r git branch -D"
|
force-delete-dead-local-branches = "!git branch -vv | grep ': gone]'| grep -v '\\*' | awk '{ if ($1 == \"+\") print $2; else print $1; }' | xargs -r git branch -D"
|
||||||
|
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = main
|
defaultBranch = main
|
||||||
|
|||||||
Reference in New Issue
Block a user