aboutsummaryrefslogtreecommitdiff
path: root/git-pull.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2011-03-25 14:13:31 -0400
committerJunio C Hamano <gitster@pobox.com>2011-03-25 14:16:27 -0700
commit4b3ffe5184bd550dddacdd0b32b18ad0e73c7908 (patch)
tree1957ccd2bee4a761f410219c8fa60cd46b438ad9 /git-pull.sh
parent97b1b4f3a682377aa8f03348618e79bd1df1772e (diff)
downloadgit-4b3ffe5184bd550dddacdd0b32b18ad0e73c7908.tar.gz
git-4b3ffe5184bd550dddacdd0b32b18ad0e73c7908.tar.xz
pull: do not clobber untracked files on initial pull
For a pull into an unborn branch, we do not use "git merge" at all. Instead, we call read-tree directly. However, we used the --reset parameter instead of "-m", which turns off the safety features. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-pull.sh')
-rwxr-xr-xgit-pull.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-pull.sh b/git-pull.sh
index 63b063a7b..e31226b62 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -274,7 +274,7 @@ esac
if test -z "$orig_head"
then
git update-ref -m "initial pull" HEAD $merge_head "$curr_head" &&
- git read-tree --reset -u HEAD || exit 1
+ git read-tree -m -u HEAD || exit 1
exit
fi