From: Marek Zawirski <marek.zawirski@gmail.com>
To: robin.rosenberg@dewire.com, spearce@spearce.org
Cc: git@vger.kernel.org, Marek Zawirski <marek.zawirski@gmail.com>
Subject: [JGIT PATCH 1/3] Fix push's RemoteRefUpdate to always force update local TrackingRefUpdate
Date: Thu, 28 Aug 2008 04:32:47 +0200 [thread overview]
Message-ID: <1219890769-20119-2-git-send-email-marek.zawirski@gmail.com> (raw)
In-Reply-To: <1219890769-20119-1-git-send-email-marek.zawirski@gmail.com>
Now, we force update local tracking ref even if we do not force remote
ref update. It seems to be sensible approach (C git one) assuming that our
repository may be out of sync with the remote one.
The potentially lost information here isn't so valuable perhaps.
Signed-off-by: Marek Zawirski <marek.zawirski@gmail.com>
---
.../spearce/jgit/transport/RemoteRefUpdate.java | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/RemoteRefUpdate.java b/org.spearce.jgit/src/org/spearce/jgit/transport/RemoteRefUpdate.java
index fd19300..623599f 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/transport/RemoteRefUpdate.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/transport/RemoteRefUpdate.java
@@ -189,7 +189,7 @@ public RemoteRefUpdate(final Repository localDb, final String srcRef,
this.forceUpdate = forceUpdate;
if (localName != null && localDb != null)
trackingRefUpdate = new TrackingRefUpdate(localDb, localName,
- remoteName, forceUpdate, newObjectId, "push");
+ remoteName, true, newObjectId, "push");
else
trackingRefUpdate = null;
this.localDb = localDb;
--
1.5.6.3
next prev parent reply other threads:[~2008-08-28 2:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-28 2:32 [JGIT PATCH 0/3] Fix local tracking refs updates during push Marek Zawirski
2008-08-28 2:32 ` Marek Zawirski [this message]
2008-08-28 2:32 ` [JGIT PATCH 2/3] Add another delete method in RefUpdate, reusing RevWalk Marek Zawirski
2008-08-28 2:32 ` [JGIT PATCH 3/3] Fix RemoteRefUpdate to delete local tracking ref upon successful deletion Marek Zawirski
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=1219890769-20119-2-git-send-email-marek.zawirski@gmail.com \
--to=marek.zawirski@gmail.com \
--cc=git@vger.kernel.org \
--cc=robin.rosenberg@dewire.com \
--cc=spearce@spearce.org \
/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).