All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Throw IllegalStateException if DirCacheEntry has not been fully initialized.
@ 2009-08-12  0:56 Grzegorz Kossakowski
  2009-08-12  0:56 ` [PATCH 2/2] Add PathSuffixFilter class which is TreeFilter Grzegorz Kossakowski
  2009-08-12  1:04 ` [PATCH 1/2] Throw IllegalStateException if DirCacheEntry has not been fully initialized Johannes Schindelin
  0 siblings, 2 replies; 5+ messages in thread
From: Grzegorz Kossakowski @ 2009-08-12  0:56 UTC (permalink / raw)
  To: git; +Cc: Grzegorz Kossakowski

From: Grzegorz Kossakowski <grek@google.com>

When mode's object type of entry equals to Constants.OBJ_BAD it's a sign
of bad (uninitialized) state of an entry and not of problems with merging.

Signed-off-by: Grzegorz Kossakowski <grek@google.com>
---
 .../org/spearce/jgit/dircache/DirCacheTree.java    |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/dircache/DirCacheTree.java b/org.spearce.jgit/src/org/spearce/jgit/dircache/DirCacheTree.java
index 9d5af70..79e95cb 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/dircache/DirCacheTree.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/dircache/DirCacheTree.java
@@ -377,7 +377,8 @@ private int computeSize(final DirCacheEntry[] cache, int cIdx,
 
 			final FileMode mode = e.getFileMode();
 			if (mode.getObjectType() == Constants.OBJ_BAD)
-				throw new UnmergedPathException(e);
+				throw new IllegalStateException("Entry \"" + e.getPathString()
+						+ "\" has incorrect mode set up.");
 
 			size += mode.copyToLength();
 			size += ep.length - pathOffset;
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-08-12  1:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-12  0:56 [PATCH 1/2] Throw IllegalStateException if DirCacheEntry has not been fully initialized Grzegorz Kossakowski
2009-08-12  0:56 ` [PATCH 2/2] Add PathSuffixFilter class which is TreeFilter Grzegorz Kossakowski
2009-08-12  0:58   ` Grzegorz Kossakowski
2009-08-12  1:04 ` [PATCH 1/2] Throw IllegalStateException if DirCacheEntry has not been fully initialized Johannes Schindelin
2009-08-12  1:15   ` Grzegorz Kossakowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.