summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2010-01-04 15:00:45 -0800
committerShawn O. Pearce <spearce@spearce.org>2010-01-12 11:56:55 -0800
commitde45869e1dc28fa99951709b9485a35dbcea4444 (patch)
tree24fd78b4a67b126cf8a134c7adb8da9e18e17f9b /org.eclipse.jgit
parentf88cac039eaa834859b2b2e748c0d8bb0ad82e67 (diff)
downloadjgit-de45869e1dc28fa99951709b9485a35dbcea4444.tar.gz
jgit-de45869e1dc28fa99951709b9485a35dbcea4444.zip
Fix RefWriter creation of info/refs to omit HEAD
We really mean to omit HEAD here, but botched the difference between getOrigName and getName on the Ref object. We tested on the wrong value, picking up the target of the symbolic ref and therefore included it twice. Change-Id: If780c65166ccada2e63a4f42bbab752a56b16564 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java
index 704cbc0522..c48449933b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2008, Charles O'Farrell <charleso@charleso.org>
- * Copyright (C) 2009, Google Inc.
+ * Copyright (C) 2009-2010, Google Inc.
* Copyright (C) 2009, Robin Rosenberg <robin.rosenberg@dewire.com>
* Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
* and other copyright owners as documented in the project's IP log.
@@ -85,7 +85,7 @@ public abstract class RefWriter {
final StringWriter w = new StringWriter();
final char[] tmp = new char[Constants.OBJECT_ID_STRING_LENGTH];
for (final Ref r : refs) {
- if (Constants.HEAD.equals(r.getName())) {
+ if (Constants.HEAD.equals(r.getOrigName())) {
// Historically HEAD has never been published through
// the INFO_REFS file. This is a mistake, but its the
// way things are.