From: Robin Rosenberg <robin.rosenberg@dewire.com>
To: spearce@sparce.org
Cc: git@vger.kernel.org, Robin Rosenberg <robin.rosenberg@dewire.com>
Subject: [EGIT PATCH 08/10] Drop unused end parameters in hunk parsing code
Date: Mon, 16 Mar 2009 21:14:41 +0100 [thread overview]
Message-ID: <1237234483-3405-9-git-send-email-robin.rosenberg@dewire.com> (raw)
In-Reply-To: <1237234483-3405-8-git-send-email-robin.rosenberg@dewire.com>
Is this safe, or should they actually be used?
---
| 2 +-
| 2 +-
.../src/org/spearce/jgit/patch/Patch.java | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
--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;
--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
next prev parent reply other threads:[~2009-03-16 20:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-16 20:14 [EGIT PATCH 00/10] JGit cleanups Robin Rosenberg
2009-03-16 20:14 ` [EGIT PATCH 01/10] Require javadoc on protected methods in jgit core Robin Rosenberg
2009-03-16 20:14 ` [EGIT PATCH 02/10] Rename the objectsUrl in the nested HttpObjectDB to Robin Rosenberg
2009-03-16 20:14 ` [EGIT PATCH 03/10] Rename variables that hides others with different content in FetchProcess Robin Rosenberg
2009-03-16 20:14 ` [EGIT PATCH 04/10] Rename a parameter i PackWriter that hides another with the same name Robin Rosenberg
2009-03-16 20:14 ` [EGIT PATCH 05/10] Rename fields to avoid hiding of field names in ReadTreeTest Robin Rosenberg
2009-03-16 20:14 ` [EGIT PATCH 06/10] Rename the gitDir fields to indicate they refer to another dir than the default Robin Rosenberg
2009-03-16 20:14 ` [EGIT PATCH 07/10] Rename a parameter in PushProcessTest that hides another Robin Rosenberg
2009-03-16 20:14 ` Robin Rosenberg [this message]
2009-03-16 20:14 ` [EGIT PATCH 09/10] Drop unused File arguments in IndexTreeWalker and WorkdirCheckout Robin Rosenberg
2009-03-16 20:14 ` [EGIT PATCH 10/10] Drop an effectively unused parameter in IndexTreeWalker Robin Rosenberg
2009-03-16 20:39 ` [EGIT PATCH 08/10] Drop unused end parameters in hunk parsing code Shawn O. Pearce
2009-03-16 20:25 ` [EGIT PATCH 02/10] Rename the objectsUrl in the nested HttpObjectDB to Shawn O. Pearce
2009-03-16 21:25 ` Robin Rosenberg
2009-03-16 21:28 ` Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1237234483-3405-9-git-send-email-robin.rosenberg@dewire.com \
--to=robin.rosenberg@dewire.com \
--cc=git@vger.kernel.org \
--cc=spearce@sparce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.