diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2012-11-01 15:47:18 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2012-11-11 11:56:33 -0600 |
commit | b0f6e45d149c033c9fe41d49af2a87d169d11f40 (patch) | |
tree | 7cc89f19d1ddbe8ded27944756eccc51f57b8205 /src/clone.c | |
parent | d18713fb4ad1ba3d18a75272e1c1c3eb45715aba (diff) | |
download | libgit2-b0f6e45d149c033c9fe41d49af2a87d169d11f40.tar.gz |
create FETCH_HEAD specially instead of as a ref file
Diffstat (limited to 'src/clone.c')
-rw-r--r-- | src/clone.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/clone.c b/src/clone.c index 7352f5fb2..d75fee213 100644 --- a/src/clone.c +++ b/src/clone.c @@ -271,6 +271,12 @@ static int setup_remotes_and_fetch( /* Create the "origin" remote */ if (!git_remote_add(&origin, repo, GIT_REMOTE_ORIGIN, origin_url)) { + /* + * Don't write FETCH_HEAD, we'll check out the remote tracking + * branch ourselves based on the server's default. + */ + git_remote_set_update_fetchhead(origin, 0); + /* Connect and download everything */ if (!git_remote_connect(origin, GIT_DIR_FETCH)) { if (!git_remote_download(origin, progress_cb, progress_payload)) { |