Merge pull request #2070 from ethomson/checkout_filemode Preserve tree filemode in index during checkout