diff options
Diffstat (limited to 'src/checkout.c')
-rw-r--r-- | src/checkout.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/checkout.c b/src/checkout.c index b58ef9f44..d5a471d0c 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -1173,7 +1173,14 @@ static int checkout_data_init( if (!data->opts.baseline) { data->opts_free_baseline = true; - if ((error = checkout_lookup_head_tree(&data->opts.baseline, repo)) < 0) + error = checkout_lookup_head_tree(&data->opts.baseline, repo); + + if (error == GIT_EORPHANEDHEAD) { + error = 0; + giterr_clear(); + } + + if (error < 0) goto cleanup; } |