aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-04-01 17:50:54 -0700
committerJunio C Hamano <gitster@pobox.com>2011-04-01 17:50:54 -0700
commit84dd63ee1d6ce08d7b85e4f1c4d7e77ef27a1578 (patch)
tree418f125d2547504da61041af79d2ae94b6cb6f07 /builtin
parent82d861f9d65080f5c66a5f3c956627af6ded78d9 (diff)
parent4b3ffe5184bd550dddacdd0b32b18ad0e73c7908 (diff)
downloadgit-84dd63ee1d6ce08d7b85e4f1c4d7e77ef27a1578.tar.gz
git-84dd63ee1d6ce08d7b85e4f1c4d7e77ef27a1578.tar.xz
Merge branch 'jk/pull-into-empty'
* jk/pull-into-empty: pull: do not clobber untracked files on initial pull merge: merge unborn index before setting ref
Diffstat (limited to 'builtin')
-rw-r--r--builtin/merge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index aa3453c5e..c8d028cbc 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1063,9 +1063,9 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
remote_head = peel_to_type(argv[0], 0, NULL, OBJ_COMMIT);
if (!remote_head)
die("%s - not something we can merge", argv[0]);
+ read_empty(remote_head->sha1, 0);
update_ref("initial pull", "HEAD", remote_head->sha1, NULL, 0,
DIE_ON_ERR);
- read_empty(remote_head->sha1, 0);
return 0;
} else {
struct strbuf merge_names = STRBUF_INIT;