From: Alex Riesen <raa.lkml@gmail.com>
To: git@vger.kernel.org
Cc: Jeff King <peff@peff.net>, Junio C Hamano <junkio@cox.net>
Subject: [PATCH] Update the tracking references only if they were succesfully updated on remote
Date: Mon, 12 Nov 2007 22:39:38 +0100 [thread overview]
Message-ID: <20071112213938.GC2918@steel.home> (raw)
In-Reply-To: <20071112213823.GB2918@steel.home>
It fixes the bug where local tracing branches were filled with zeroed SHA-1
if the remote branch was not updated because, for instance, it was not
an ancestor of the local (i.e. had other changes).
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
Jeff, I think your change (334f4831e5a77) was either not complete or
got broken some time later.
send-pack.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/send-pack.c b/send-pack.c
index b74fd45..d56d980 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -349,7 +349,8 @@ static int send_pack(int in, int out, struct remote *remote, int nr_refspec, cha
if (!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)
--
1.5.3.5.648.g1e92c
next prev parent reply other threads:[~2007-11-12 21:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-12 21:38 [PATCH] Add a test checking if send-pack updated local tracking branches correctly Alex Riesen
2007-11-12 21:39 ` Alex Riesen [this message]
2007-11-13 7:52 ` [PATCH] Update the tracking references only if they were succesfully updated on remote Jeff King
2007-11-13 19:47 ` Alex Riesen
2007-11-13 19:49 ` [PATCH] Add a test for deleting remote branches Alex Riesen
2007-11-13 23:02 ` [PATCH] Improved and extended t5404 Alex Riesen
2007-11-13 23:10 ` Jeff King
2007-11-15 4:26 ` Jeff King
2007-11-15 20:46 ` [PATCH] Add test that checks diverse aspects of updating remote and tracking branches Alex Riesen
2007-11-14 0:02 ` [PATCH] Improved and extended t5404 Junio C Hamano
2007-11-14 7:19 ` Alex Riesen
2007-11-14 8:47 ` Junio C Hamano
2007-11-14 17:10 ` Johannes Schindelin
2007-11-14 19:45 ` Alex Riesen
2007-11-14 20:34 ` Alex Riesen
2007-11-14 22:01 ` Johannes Schindelin
2007-11-15 4:18 ` Jeff King
2007-11-15 4:35 ` Jeff King
2007-11-15 5:55 ` Junio C Hamano
2007-11-14 21:52 ` Junio C Hamano
2007-11-14 22:49 ` [PATCH] Add test that checks diverse aspects of updating remote and tracking branches Alex Riesen
2007-11-14 21:52 ` [PATCH] Improved and extended t5404 Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071112213938.GC2918@steel.home \
--to=raa.lkml@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).