From 5910686c10e85f60ec69c9aa7532273953fe9d21 Mon Sep 17 00:00:00 2001 From: Christopher Tubbs Date: Mon, 24 Aug 2020 15:17:45 -0400 Subject: [PATCH] Update worktrees if only ignored files are dirty Don't skip updating a worktree if the only reason the workspace is dirty is because files matching an ignore pattern are present. --- git-sync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-sync b/git-sync index 694653b..cc97936 100755 --- a/git-sync +++ b/git-sync @@ -56,7 +56,7 @@ function updateWorktrees() { ifDone "$b" && continue markDone "$b" - if [[ -n $(cd "$w" && git status --porcelain --ignored=matching) ]]; then + if [[ -n $(cd "$w" && git status --porcelain --ignored=no) ]]; then echo "Skipping $(red "$b"): workspace dirty at $(yellow "$w")" else r=$(git config "branch.$b.remote")