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>
This commit is contained in:

committed by
Junio C Hamano

parent
5d46c9d41f
commit
b516968ff6
@ -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--)
|
||||
|
Reference in New Issue
Block a user