CheckoutCommand: Fix checking out ours/theirs when no base stage exists

In case of an add/add conflict, no base stage exists. The previous
implementation would skip over the entries because the condition
expected the base stage to always exist.

Change-Id: Ie2b3685d958c09b241991b74e6177401e8a1ebc9
Signed-off-by: Robin Stocker <robin@nibor.org>
Fix DirCacheCheckout to set correct file length if core.autocrlf=true

To update the file length stat we need to use the length of the
temporary file since it's not yet renamed to the target file name here.
The incorrect file length stat update was introduced in
a606dc363d0f6b09e4527cca6b645d3cb1ec407d.

Bug: 453962
Change-Id: I715c048227553efae6f8f6b6878c0f04f2609d9c
Also-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
Also-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Merge "CheckoutCommand: Fix checking out ours/theirs when no base stage exists" into stable-3.6
Merge "Fix DirCacheCheckout to set correct file length if core.autocrlf=true" into stable-3.6