summaryrefslogtreecommitdiff
path: root/builtin-clone.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-20 14:29:49 -0700
committerJunio C Hamano <gitster@pobox.com>2009-03-20 14:29:49 -0700
commit0f64f874317a67d4d32bc10d85cf19e27ff0e43b (patch)
tree772cfd2b104ea3a9fb55f2265bfc7073746757f7 /builtin-clone.c
parent72c2de5c416baaaad16ab36a88b518d1aacf2a87 (diff)
parent72f600832f75db626fd9290a21d02d49c92ca9ca (diff)
downloadgit-0f64f874317a67d4d32bc10d85cf19e27ff0e43b.tar.gz
Merge branch 'jc/clone-branch-rebase'
* jc/clone-branch-rebase: Improve "git branch --tracking" output Make git-clone respect branch.autosetuprebase Conflicts: builtin-clone.c
Diffstat (limited to 'builtin-clone.c')
-rw-r--r--builtin-clone.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/builtin-clone.c b/builtin-clone.c
index efbc804a3d..7fbfbf973c 100644
--- a/builtin-clone.c
+++ b/builtin-clone.c
@@ -20,6 +20,7 @@
#include "dir.h"
#include "pack-refs.h"
#include "sigchain.h"
+#include "branch.h"
#include "remote.h"
#include "run-command.h"
@@ -315,19 +316,6 @@ static struct ref *write_remote_refs(const struct ref *refs,
return local_refs;
}
-static void install_branch_config(const char *local,
- const char *origin,
- const char *remote)
-{
- struct strbuf key = STRBUF_INIT;
- strbuf_addf(&key, "branch.%s.remote", local);
- git_config_set(key.buf, origin);
- strbuf_reset(&key);
- strbuf_addf(&key, "branch.%s.merge", local);
- git_config_set(key.buf, remote);
- strbuf_release(&key);
-}
-
int cmd_clone(int argc, const char **argv, const char *prefix)
{
int is_bundle = 0;
@@ -514,7 +502,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
remote_head = NULL;
option_no_checkout = 1;
if (!option_bare)
- install_branch_config("master", option_origin,
+ install_branch_config(0, "master", option_origin,
"refs/heads/master");
}
@@ -544,7 +532,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
head_points_at->peer_ref->name,
reflog_msg.buf);
- install_branch_config(head, option_origin,
+ install_branch_config(0, head, option_origin,
head_points_at->name);
}
} else if (remote_head) {