magit-commit-add-log: properly abort if nothing is committed

See #1438.