git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[JGIT PATCH 1/5] Remove dead/unused reset method from CountingOutputStream

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 26, 2009, 01:21 UTC
Message-ID
<1238030515-31768-1-git-send-email-spearce@spearce.org>
We never reset the stream, so just remove that as a valid option.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 .../spearce/jgit/util/CountingOutputStream.java    |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/util/CountingOutputStream.java b/org.spearce.jgit/src/org/spearce/jgit/util/CountingOutputStream.java
index b0b5f7d..5f333f5 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/util/CountingOutputStream.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/util/CountingOutputStream.java
@@ -72,17 +72,9 @@ public void write(byte[] b, int off, int len) throws IOException {
 	/**
 	 * Return number of already written bytes.
 	 *
-	 * @return number of written bytes since last reset (object is reset upon
-	 *         creation)
+	 * @return number of written bytes since stream start.
 	 */
 	public long getCount() {
 		return count;
 	}
-
-	/**
-	 * Reset counter to zero value.
-	 */
-	public void reset() {
-		count = 0;
-	}
 }
-- 
1.6.2.1.471.g682837
Next: Shawn O. Pearce
Message 1 of 11 in “Remove dead/unused reset method from CountingOutputStream”
  1. 1/5 Remove dead/unused reset method from CountingOutputStreamShawn O. Pearce, Mar 26, 2009
  2. 2/5 Implement CRC32 computation during PackWriterShawn O. Pearce, Mar 26, 2009
  3. 3/5 Test case for pack index CRC32 when written by PackWriterShawn O. Pearce, Mar 26, 2009
  4. 4/5 Write the pack header in one shotShawn O. Pearce, Mar 26, 2009
  5. 5/5 Use Deflater directly in PackWriterShawn O. Pearce, Mar 26, 2009
  6. Daniel ChengMar 26, 2009
  7. Daniel ChengMar 26, 2009
  8. Robin RosenbergMar 27, 2009
  9. Shawn O. PearceMar 27, 2009
  10. Shawn O. PearceMar 27, 2009
  11. Robin RosenbergMar 27, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.