When making a virtual diff target of an empty old_head,
we would first find the diff of the commit. However if this
diff is empty, we'd pass an empty string to git update-index
which would then hang as it is expecting at least one input.
Solution is to not call update-index at all if there is no diff
as it is not necessary. We can just return new_base.
When making a virtual diff target of an empty old_head, we would first find the diff of the commit. However if this diff is empty, we'd pass an empty string to git update-index which would then hang as it is expecting at least one input.
Solution is to not call update-index at all if there is no diff as it is not necessary. We can just return new_base.
Topic: fix_hang Reviewers: brian-k