Skip to content
Snippets Groups Projects
Commit 172b6428 authored by Clemens Buchacher's avatar Clemens Buchacher Committed by Junio C Hamano
Browse files

do not overwrite untracked during merge from unborn branch


In case HEAD does not point to a valid commit yet, merge is
implemented as a hard reset. This will cause untracked files to be
overwritten.

Instead, assume the empty tree for HEAD and do a regular merge. An
untracked file will cause the merge to abort and do nothing. If no
conflicting files are present, the merge will have the same effect
as a hard reset.

Signed-off-by: default avatarClemens Buchacher <drizzd@aon.at>
Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
parent 2caf20c5
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment