Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 345956

Summary: Incorrect diff leads to incorrect merge
Product: [Technology] JGit Reporter: Shawn Pearce <sop>
Component: JGitAssignee: Shawn Pearce <sop>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: stefan.lay
Version: 0.12   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

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