summaryrefslogtreecommitdiff
path: root/builtin-push.c
diff options
context:
space:
mode:
authorDaniel Barkalow <barkalow@iabervon.org>2007-05-15 22:50:19 -0400
committerJunio C Hamano <junkio@cox.net>2007-05-20 21:32:57 -0700
commitb516968ff62ec153e008d033c153affd7ba9ddc6 (patch)
tree3079005e6676647ea8b6b4f3bddbf68cb6b1f885 /builtin-push.c
parent5d46c9d41febe5fe85f94f7db2b190d8abf1e71e (diff)
downloadgit-b516968ff62ec153e008d033c153affd7ba9ddc6.tar.gz
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 <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-push.c')
-rw-r--r--builtin-push.c9
1 files changed, 7 insertions, 2 deletions
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--)