Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345956 - Incorrect diff leads to incorrect merge
Summary: Incorrect diff leads to incorrect merge
Status: CLOSED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 0.12   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Shawn Pearce CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-16 10:25 EDT by Shawn Pearce CLA
Modified: 2011-05-16 21:20 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Pearce CLA 2011-05-16 10:25:24 EDT
1. Apply the patch below to a vanilla checked out v2.6.32 checked out copy (patch -p1)
2. Run `jgit diff` and observe the result is *not* the same. This is true for any DifferenceAlgorithm.

--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -685,6 +685,7 @@ static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sc
 
 static void check_spread(struct cfs_rq *cfs_rq, struct sched_entity *se)
 {
+#if 0
 #ifdef CONFIG_SCHED_DEBUG
        s64 d = se->vruntime - cfs_rq->min_vruntime;
 
@@ -694,6 +695,7 @@ static void check_spread(struct cfs_rq *cfs_rq, struct sched
        if (d > 3*sysctl_sched_latency)
                schedstat_inc(cfs_rq, nr_spread_over);
 #endif
+#endif
 }
 
 static void
Comment 1 Shawn Pearce CLA 2011-05-16 11:21:46 EDT
This bug is caused by the "fix" for an older diff bug 328895.
Comment 2 Stefan Lay CLA 2011-05-16 21:20:23 EDT
Fixed by c2b87d59a0ca13f1444