aboutsummaryrefslogtreecommitdiff
path: root/builtin-send-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-14 03:11:37 -0800
committerJunio C Hamano <gitster@pobox.com>2007-11-14 03:11:37 -0800
commit2d4eb71c6c06e8f15351d996a9413974e15cab0b (patch)
treec0b080254cea71fbb881978f6e5b6f141efd3e11 /builtin-send-pack.c
parenta108e5386122c75a350e9a191fc727895941ddff (diff)
parented31df312a30d91c288a4b6e3d031de15284405a (diff)
downloadgit-2d4eb71c6c06e8f15351d996a9413974e15cab0b.tar.gz
git-2d4eb71c6c06e8f15351d996a9413974e15cab0b.tar.xz
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
Diffstat (limited to 'builtin-send-pack.c')
-rw-r--r--builtin-send-pack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-send-pack.c b/builtin-send-pack.c
index 947c42b95..22cb50bc2 100644
--- a/builtin-send-pack.c
+++ b/builtin-send-pack.c
@@ -348,7 +348,8 @@ static int do_send_pack(int in, int out, struct remote *remote, int nr_refspec,
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)