Skip to content

Commit

Permalink
Update worktrees if only ignored files are dirty
Browse files Browse the repository at this point in the history
Don't skip updating a worktree if the only reason the workspace is dirty
is because files matching an ignore pattern are present.
  • Loading branch information
ctubbsii committed Aug 24, 2020
1 parent 58e0640 commit 5910686
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-sync
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 5910686

Please sign in to comment.