[JGIT PATCH 1/3] Fix push's RemoteRefUpdate to always force update local TrackingRefUpdate
- From
- Marek Zawirski <marek.zawirski@gmail.com>
- Date
- Aug 28, 2008, 02:32 UTC
- Message-ID
- <1219890769-20119-2-git-send-email-marek.zawirski@gmail.com>
- 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