Patch Set 12:

I updated this change to make use of the file mode information already stored in WorkingTreeIterator through the WorkingTreeOptions field.

This allows the WorkingTreeIterator to determine the target file mode for the index and removes duplicated code between AddCommand and CommitCommand.