Closed nsp closed 11 years ago
What exactly is the intent of this command? Do you have an example use case?
A bad habit I fall into is in leaving config changes uncommitted after they're working, and with an 'isunclean' command I could create a cron job and/or login/logout scripts that check for this situation and return a simple error code that I can work with.
Cool, this definitely makes sense. However, I think that this is something that is more of a git feature than a dfm feature. It can be added to your .gitconfig
like this:
[alias]
isunclean = "![ -n \"`git ls-files --modified --deleted --others --exclude-standard`\" ]"
Then, to call it, use the dfm passthrough:
$ if dfm isunclean; then echo 'danger danger!'; fi
danger danger!
You know, I like your way of doing it a lot better, because then I'd have the alias for every other git repo.
etckeeper does this with the following /bin/sh syntax