author | Junio C Hamano <gitster@pobox.com> | |
Fri, 18 Jun 2010 18:16:55 +0000 (11:16 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 18 Jun 2010 18:16:55 +0000 (11:16 -0700) |
* jn/remote-set-branches:
Add git remote set-branches
Conflicts:
builtin/remote.c
Add git remote set-branches
Conflicts:
builtin/remote.c
1 | 2 | |||
---|---|---|---|---|
Documentation/git-remote.txt | patch | | diff1 | | diff2 | | blob | history |
builtin/remote.c | patch | | diff1 | | diff2 | | blob | history |
t/t5505-remote.sh | patch | | diff1 | | diff2 | | blob | history |
diff --cc Documentation/git-remote.txt
Simple merge
diff --cc builtin/remote.c
index 0e99a9957dad39ded17ce98de49b164fdb70eacd,c4d17b52bc7725c1e1c77e1ce3e2379729a924c4..4745957b9602ed9fe5c983de35ad74cc85e9b537
--- 1/builtin/remote.c
--- 2/builtin/remote.c
+++ b/builtin/remote.c
return 0;
}
+enum {
+ TAGS_UNSET = 0,
+ TAGS_DEFAULT = 1,
+ TAGS_SET = 2
+};
+
+ static int add_branch(const char *key, const char *branchname,
+ const char *remotename, int mirror, struct strbuf *tmp)
+ {
+ strbuf_reset(tmp);
+ strbuf_addch(tmp, '+');
+ if (mirror)
+ strbuf_addf(tmp, "refs/%s:refs/%s",
+ branchname, branchname);
+ else
+ strbuf_addf(tmp, "refs/heads/%s:refs/remotes/%s/%s",
+ branchname, remotename, branchname);
+ return git_config_set_multivar(key, tmp->buf, "^$", 0);
+ }
+
static int add(int argc, const char **argv)
{
- int fetch = 0, mirror = 0;
+ int fetch = 0, mirror = 0, fetch_tags = TAGS_DEFAULT;
struct string_list track = { NULL, 0, 0 };
const char *master = NULL;
struct remote *remote;
diff --cc t/t5505-remote.sh
Simple merge