Merge branch 'nd/no-extern'
[gitweb.git] / builtin / clone.c
index 5c0adbd6d0a360f3cf5825bcd52e8c4e386fed84..fd2c3ef090146058651af5e411dd304153ee114d 100644 (file)
@@ -15,6 +15,7 @@
 #include "fetch-pack.h"
 #include "refs.h"
 #include "refspec.h"
+#include "object-store.h"
 #include "tree.h"
 #include "tree-walk.h"
 #include "unpack-trees.h"
@@ -695,7 +696,8 @@ static void update_head(const struct ref *our, const struct ref *remote,
                        install_branch_config(0, head, option_origin, our->name);
                }
        } else if (our) {
-               struct commit *c = lookup_commit_reference(&our->old_oid);
+               struct commit *c = lookup_commit_reference(the_repository,
+                                                          &our->old_oid);
                /* --branch specifies a non-branch (i.e. tags), detach HEAD */
                update_ref(msg, "HEAD", &c->object.oid, NULL, REF_NO_DEREF,
                           UPDATE_REFS_DIE_ON_ERR);
@@ -1210,7 +1212,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
 
        update_remote_refs(refs, mapped_refs, remote_head_points_at,
                           branch_top.buf, reflog_msg.buf, transport,
-                          !is_local && !filter_options.choice);
+                          !is_local);
 
        update_head(our_head_points_at, remote_head, reflog_msg.buf);