summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 19feebc)
raw | patch | inline | side by side (parent: 19feebc)
author | Junio C Hamano <junkio@cox.net> | |
Fri, 27 May 2005 22:55:01 +0000 (15:55 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Sun, 29 May 2005 18:17:43 +0000 (11:17 -0700) |
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>
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>
diff.c | patch | blob | history | |
diffcore.h | patch | blob | history |
index a11675551e8330a89ed2d56ed612d219ec71d4b8..bafbc09808d393ceddc0c0445d322568b2007853 100644 (file)
--- a/diff.c
+++ b/diff.c
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;
diff --git a/diffcore.h b/diffcore.h
index 0f82bd933ec2f173d588383ede37890da562578e..e9cf2edcf41bcb2f96fc784b72c26c825d6590be 100644 (file)
--- a/diffcore.h
+++ b/diffcore.h
struct diff_filespec *);
extern void diff_q(struct diff_queue_struct *, struct diff_filepair *);
-extern int diff_needs_to_stay(struct diff_queue_struct *, int,
- struct diff_filespec *);
-
#define DIFF_DEBUG 0
#if DIFF_DEBUG
void diff_debug_filespec(struct diff_filespec *, int, const char *);