Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Update .bash_prompt #223
I was talking about @paulirish’s version: it doesn’t consider new, untracked files as dirty, even though it should IMHO — but it’s probably worth it because of the greatly improved performance (especially on large repositories like the WebKit project).
IMHO ideally we’d have both: a fast implementation that still detects untracked files. What does your version do?
Thanks for the clarification, my change is a hybrid of what @mathiasbynens and @paulirish had. Although I can't speak to its speed, it does detect untracked files and it removes the wildcards from the string evaluation.
I was using @paulirish implementation before and I noticed that it would give me a false positive during commits and wasn't tracking untracked files, so this was my stab at bringing two worlds together.