From b516968ff62ec153e008d033c153affd7ba9ddc6 Mon Sep 17 00:00:00 2001 From: Daniel Barkalow Date: Tue, 15 May 2007 22:50:19 -0400 Subject: Update local tracking refs when pushing This also adds a --remote option to send-pack, which specifies the configured remote being used. It is provided automatically by git-push, and must match the url (which is still needed, since there could be multiple urls). Signed-off-by: Daniel Barkalow Signed-off-by: Junio C Hamano --- builtin-push.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'builtin-push.c') diff --git a/builtin-push.c b/builtin-push.c index 0e602f3bf2..6084899b2b 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -178,8 +178,13 @@ static int do_push(const char *repo) if (!prefixcmp(dest, "http://") || !prefixcmp(dest, "https://")) sender = "http-push"; - else if (thin) - argv[dest_argc++] = "--thin"; + else { + char *rem = xmalloc(strlen(remote->name) + 10); + sprintf(rem, "--remote=%s", remote->name); + argv[dest_argc++] = rem; + if (thin) + argv[dest_argc++] = "--thin"; + } argv[0] = sender; argv[dest_argc++] = dest; while (dest_refspec_nr--) -- cgit v1.2.1