git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Strange diff behavior?
@ 2007-06-21  1:02 Jason Sewall
  2007-06-21  1:13 ` Johannes Schindelin
  2007-06-21  6:50 ` Matthias Lederhofer
  0 siblings, 2 replies; 7+ messages in thread
From: Jason Sewall @ 2007-06-21  1:02 UTC (permalink / raw)
  To: git

I'm pretty new to git, but I've been using it a lot recently and I'm
really liking it.

I do have a question that I'm 99% sure is a stupid one but I'd like an
answer anyway.

I recently make a few simple changes to a working directory, and
decided to do a diff before I committed it.

The results were something like the diff at the end of this email.

It seems like every change listed after the first one is meaningless.
I really think I just don't understand something about the diff
algorithm. Can someone tell my why those empty lines are recorded as
changes?

Jason

P.S. git diff --check is empty; there's no whitespace on those lines

P.P.S. The diff:

diff --git a/mac.cpp b/mac.cpp
index 02aab7b..34c510b 100644
--- a/mac.cpp
+++ b/mac.cpp
@@ -80,10 +80,10 @@ float grid::bilerp(const uVec & lower, const Vec &
inpos) const
     idx[0] += 1;
     vals[3] = (*this)(idx); // 1, 1

-    float low_val = lerp(pos[0], vals[0], vals[1]);
-    float high_val = lerp(pos[0], vals[2], vals[3]);
+    float low_val = cog::lerp(pos[0], vals[0], vals[1]);
+    float high_val = cog::lerp(pos[0], vals[2], vals[3]);

-    return lerp(pos[1], low_val, high_val);
+    return cog::lerp(pos[1], low_val, high_val);
 }

 float grid::max() const
@@ -194,7 +194,7 @@ mac_grid::mac_grid(const Vec & low, const Vec &
high, unsigned int dim) : low_bo

         for(idx[0] = (dim_-1)/4+1; idx[0] < 3*(dim_-1)/4; idx[0]++)
             cell_type(idx) = SOLID;
-
+
         for(idx[0] = 3*(dim_-1)/4+1; idx[0] < (dim_-1); idx[0]++)
             cell_type(idx) = SOLID;
     }
@@ -636,7 +636,7 @@ void mac_grid::printA(std::ostream & out)
     out << "sparse(";

     iVec idx;
-
+
     out << "[";
     for(idx[1] = 0; idx[1] < static_cast<int>(dim_); idx[1]++)
         for(idx[0] = 0; idx[0] < static_cast<int>(dim_); idx[0]++)
@@ -645,7 +645,7 @@ void mac_grid::printA(std::ostream & out)
             iVec e(idx + iVec(1, 0));
             iVec s(idx - iVec(0, 1));
             iVec n(idx + iVec(0, 1));
-
+
             if(w[0] > 0)
                 out << row_major_idx(idx, Adiag_.dim_)+1 <<",";
             if(s[1] > 0)
@@ -654,7 +654,7 @@ void mac_grid::printA(std::ostream & out)
                 out << row_major_idx(idx, Adiag_.dim_)+1 <<",";
             if(n[1] < static_cast<int>(dim_))
                 out << row_major_idx(idx, Adiag_.dim_)+1 <<",";
-
+
             out << row_major_idx(idx, Adiag_.dim_)+1 <<",";
         }

@@ -742,7 +742,7 @@ float mac_grid::dot(const grid & l, const grid & r) const
         for(idx[0] = 1; idx[0] < dim_-1; idx[0]++)
             if(cell_type(idx) == FLUID)
                 res += l(idx)*r(idx);
-
+
     return res;
 }

@@ -903,7 +903,7 @@ void mac_grid::construct_pc()
                 {
                     float sfact = Aplusj_(s)*pc_(s);
                     ichol += sfact*sfact;
-
+
                     float wfact = Aplusi_(w)*pc_(w);
                     ichol += wfact*wfact;
                 }
@@ -940,7 +940,7 @@ void mac_grid::apply_pc(const grid & rhs, grid & res)
         {
             uVec s(idx-uVec(0, 1));
             uVec w(idx-uVec(1, 0));
-
+
             float t = rhs(idx);
             if(cell_type(s) == FLUID)
                 t -= Aplusj_(s)*pc_(s)*q_(s);

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-06-21 16:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-21  1:02 Strange diff behavior? Jason Sewall
2007-06-21  1:13 ` Johannes Schindelin
2007-06-21  6:47   ` Raimund Bauer
2007-06-21 10:31     ` Johannes Schindelin
2007-06-21 16:46       ` Jason Sewall
2007-06-21  6:50 ` Matthias Lederhofer
2007-06-21  7:02   ` Jason Sewall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).