diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-04-01 17:50:54 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-04-01 17:50:54 -0700 |
commit | 84dd63ee1d6ce08d7b85e4f1c4d7e77ef27a1578 (patch) | |
tree | 418f125d2547504da61041af79d2ae94b6cb6f07 /builtin | |
parent | 82d861f9d65080f5c66a5f3c956627af6ded78d9 (diff) | |
parent | 4b3ffe5184bd550dddacdd0b32b18ad0e73c7908 (diff) | |
download | git-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.c | 2 |
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; |