[EGIT PATCH 08/10] Drop unused end parameters in hunk parsing code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is this safe, or should they actually be used?
---
 .../org/spearce/jgit/patch/CombinedHunkHeader.java |    2 +-
 .../src/org/spearce/jgit/patch/HunkHeader.java     |    2 +-
 .../src/org/spearce/jgit/patch/Patch.java          |    8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/patch/CombinedHunkHeader.java b/org.spearce.jgit/src/org/spearce/jgit/patch/CombinedHunkHeader.java
index 83ea681..b1aef91 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/patch/CombinedHunkHeader.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/patch/CombinedHunkHeader.java
@@ -90,7 +90,7 @@ public OldImage getOldImage(final int nthParent) {
 	}
 
 	@Override
-	void parseHeader(final int end) {
+	void parseHeader() {
 		// Parse "@@@ -55,12 -163,13 +163,15 @@@ protected boolean"
 		//
 		final byte[] buf = file.buf;
diff --git a/org.spearce.jgit/src/org/spearce/jgit/patch/HunkHeader.java b/org.spearce.jgit/src/org/spearce/jgit/patch/HunkHeader.java
index e3ce546..e9c55e3 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/patch/HunkHeader.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/patch/HunkHeader.java
@@ -161,7 +161,7 @@ public int getLinesContext() {
 		return nContext;
 	}
 
-	void parseHeader(final int end) {
+	void parseHeader() {
 		// Parse "@@ -236,9 +236,9 @@ protected boolean"
 		//
 		final byte[] buf = file.buf;
diff --git a/org.spearce.jgit/src/org/spearce/jgit/patch/Patch.java b/org.spearce.jgit/src/org/spearce/jgit/patch/Patch.java
index 9c2a8d6..4b2121e 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/patch/Patch.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/patch/Patch.java
@@ -222,7 +222,7 @@ private int parseDiffGit(final byte[] buf, final int start, final int end) {
 		final FileHeader fh = new FileHeader(buf, start);
 		int ptr = fh.parseGitFileName(start + DIFF_GIT.length, end);
 		if (ptr < 0)
-			return skipFile(buf, start, end);
+			return skipFile(buf, start);
 
 		ptr = fh.parseGitHeaders(ptr, end);
 		ptr = parseHunks(fh, ptr, end);
@@ -236,7 +236,7 @@ private int parseDiffCombined(final byte[] hdr, final byte[] buf,
 		final CombinedFileHeader fh = new CombinedFileHeader(buf, start);
 		int ptr = fh.parseGitFileName(start + hdr.length, end);
 		if (ptr < 0)
-			return skipFile(buf, start, end);
+			return skipFile(buf, start);
 
 		ptr = fh.parseGitHeaders(ptr, end);
 		ptr = parseHunks(fh, ptr, end);
@@ -255,7 +255,7 @@ private int parseTraditionalPatch(final byte[] buf, final int start,
 		return ptr;
 	}
 
-	private static int skipFile(final byte[] buf, int ptr, final int end) {
+	private static int skipFile(final byte[] buf, int ptr) {
 		ptr = nextLF(buf, ptr);
 		if (match(buf, ptr, OLD_NAME) >= 0)
 			ptr = nextLF(buf, ptr);
@@ -282,7 +282,7 @@ private int parseHunks(final FileHeader fh, int c, final int end) {
 
 			if (isHunkHdr(buf, c, end) == fh.getParentCount()) {
 				final HunkHeader h = fh.newHunkHeader(c);
-				h.parseHeader(end);
+				h.parseHeader();
 				c = h.parseBody(this, end);
 				h.endOffset = c;
 				fh.addHunk(h);
-- 
1.6.1.285.g35d8b

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux