summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-05-27 22:55:01 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-29 18:17:43 (GMT)
commitbe020332a152ef95e0e8435fb69d8c02d5da29bb (patch)
treefac5ce94e82c801f45d93b8b6461ed89e69c011e /diff.c
parent19feebc8c3ca7bd40f2f32f4f856b68b9a02870c (diff)
downloadgit-be020332a152ef95e0e8435fb69d8c02d5da29bb.zip
git-be020332a152ef95e0e8435fb69d8c02d5da29bb.tar.gz
git-be020332a152ef95e0e8435fb69d8c02d5da29bb.tar.bz2
[PATCH] Remove a function not used anymore.
Earlier rename/copy detection left unmodified filepair in the output and forced downstream to keep them even when they are filtering, and the diff_needs_to_stay() function was used for the logic. It is not used anymore, so remove it. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/diff.c b/diff.c
index a116755..bafbc09 100644
--- a/diff.c
+++ b/diff.c
@@ -647,28 +647,6 @@ static void diff_flush_patch(struct diff_filepair *p)
run_diff(name, other, p->one, p->two, msg);
}
-int diff_needs_to_stay(struct diff_queue_struct *q, int i,
- struct diff_filespec *it)
-{
- /* If it will be used in later entry (either stay or used
- * as the source of rename/copy), we need to copy, not rename.
- */
- while (i < q->nr) {
- struct diff_filepair *p = q->queue[i++];
- if (!DIFF_FILE_VALID(p->two))
- continue; /* removed is fine */
- if (strcmp(p->one->path, it->path))
- continue; /* not relevant */
-
- /* p has its src set to *it and it is not a delete;
- * it will be used for in-place change, rename/copy,
- * or just stays there. We cannot rename it out.
- */
- return 1;
- }
- return 0;
-}
-
int diff_queue_is_empty(void)
{
struct diff_queue_struct *q = &diff_queued_diff;