To automate our salesforce development flow, we are using Git + Jenkins + Ant to deploy all committed changes to target organization. It works fine! But the only big problem is that all metadata files will be built and deployed every time. Ant use "Package.xml" as deployment list and this file includes all metadata by default. So "package.xml" should be auto-updated based on git commits and it will only contain the changed files. I guess some shell script is needed, but i really don't know how to do it.
Does anyone have a complete solution for this?