|
|
|
|
|
by evincarofautumn
4814 days ago
|
|
This is a bad idea. I can come up with a TODO at any time; I especially do when I’m in the middle of something and have staged local changes. In that case, this: git commit --allow-empty -m "TODO: $*"
Will do the wrong thing—committing my staged changes even if I didn’t want that, and giving them a wrong commit message. If the change is small, I might not notice. If I were going to involve Git in my task tracking, I would much prefer something like this: todo() {
touch TODO
printf "%s\n%s\n\n" "$(date)" "$*" | cat - TODO > TODO.tmp
mv TODO.tmp TODO
$(git config core.editor) TODO
}
|
|