From: Junio C Hamano Date: Wed, 14 Nov 2007 11:11:37 +0000 (-0800) Subject: Merge branch 'ar/send-pack-remote-track' into jk/send-pack X-Git-Tag: v1.5.4-rc0~152^2~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2d4eb71c6c06e8f15351d996a9413974e15cab0b;p=git.git Merge branch 'ar/send-pack-remote-track' into jk/send-pack * ar/send-pack-remote-track: Update the tracking references only if they were succesfully updated on remote Add a test checking if send-pack updated local tracking branches correctly --- 2d4eb71c6c06e8f15351d996a9413974e15cab0b diff --cc builtin-send-pack.c index 947c42b95,d56d980af..22cb50bc2 --- a/builtin-send-pack.c +++ b/builtin-send-pack.c @@@ -346,9 -347,10 +346,10 @@@ static int do_send_pack(int in, int out ret = -4; } - if (!dry_run && remote && ret == 0) { + if (!args.dry_run && remote && ret == 0) { for (ref = remote_refs; ref; ref = ref->next) - update_tracking_ref(remote, ref); + if (!is_null_sha1(ref->new_sha1)) + update_tracking_ref(remote, ref); } if (!new_refs && ret == 0)