dotcloud/docker — pull request #4078 by vieux (2014-02-12 00:49:24+00:00)
Title: Rewrite docker rmi

* if an image as children, tagged or not, we do not delete, -> only untag
* if an image has multiple tags and delete via id, -> delete
* if an image has multiple tags and delete via tag, -> untag
* when deleting an img, if it’s parent has only one child, tagged or not, (img) we try delete the parent with the same rules as above
* docker rmi ubuntu:latest is the same thing as docker rmi 8dbd9e392a96
* docker rmi ubuntu is the same as docker rmi ubuntu:latest (like today)

I still need to bump the api version, please do not merge yet, but test it :)