build-tools icon indicating copy to clipboard operation
build-tools copied to clipboard

image-tag: Rework the -WIP logic

Open dlespiau opened this issue 8 years ago • 4 comments

Seems like grepping the output of git status --porcelain broke. Use a different approach with git diff and only check the events we care about (having staged and un staged changes).

dlespiau avatar Nov 16 '17 17:11 dlespiau

IIRC the reason I changed this was to avoid git reading all the files to generate a diff, which can be slow over a mounted filesystem.

leth avatar Dec 14 '17 12:12 leth

@leth would you care to explain your regex? ISTM that a regex approach should work, but I had git status --porcelain like this:

 M src/kubernetes.js
 M src/server.js
 M tools/image-tag
?? src/oneweave.js
?? src/oneweave.js~

and it decided that meant there was no WIP.

bboreham avatar Dec 14 '17 14:12 bboreham

I tested it with that output, and it correctly said -WIP for me, so I'm not sure what is broken. I think i've overcomplicated the regex though: grep -qE '^[^ ][^ ]\s' would suffice.

leth avatar Dec 14 '17 14:12 leth

what is happening with this?

bboreham avatar Feb 27 '18 16:02 bboreham