From: "Jason Sewall" <jasonsewall@gmail.com>
To: git@vger.kernel.org
Subject: Strange diff behavior?
Date: Wed, 20 Jun 2007 18:02:13 -0700 [thread overview]
Message-ID: <31e9dd080706201802h9dcbffawd82575d09e082155@mail.gmail.com> (raw)
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);
next reply other threads:[~2007-06-21 1:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-21 1:02 Jason Sewall [this message]
2007-06-21 1:13 ` Strange diff behavior? 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=31e9dd080706201802h9dcbffawd82575d09e082155@mail.gmail.com \
--to=jasonsewall@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).