<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 04/11/2011 02:53 PM, Dave Cohen wrote:
<blockquote cite="mid:201104111253.11730.drupal@dave-cohen.com"
type="cite"><br>
<pre wrap="">I suppose if you're a fan of git, you can argue that it is always right.
</pre>
</blockquote>
I'm no more a"fan" of git than i am of drupal. Its a tool that has
good value if you know how to use it and can frustrate the hell out
of you if you dont.<br>
<blockquote cite="mid:201104111253.11730.drupal@dave-cohen.com"
type="cite">
<pre wrap="">
If you're like me, on the other hand, you might expect something to show up in git diff, after you've run git add.
</pre>
</blockquote>
It just has one more layer of intelligence/workflow that allows
it/you to ignore changes in your working copy that you don't want to
pay attention right now. If you're like me and have a couple things
going on at once and want to commit your work in atomic chunks you
can find it useful. If not there are git shortcuts for commits to
ignore the whole layer.<br>
<blockquote cite="mid:201104111253.11730.drupal@dave-cohen.com"
type="cite">
<blockquote type="cite">
<pre wrap="">
To do what you want above, just temporarily tell git to care about your
new files with "git add ." or listing them by name and then run "git
diff HEAD".
</pre>
</blockquote>
<pre wrap="">
I find that "git diff HEAD" is wrong because I'm not working on HEAD. Similarly, "git diff origin" does not do the right thing.
</pre>
</blockquote>
You find that its wrong or it doesnt work? These are two different
things.<br>
<br>
HEAD is a special dynamic variable that refers to the most recent
commit in the index. It is there so you don't have to type in the
whole commits crazy ass SHA name. In that way it works EXACTLY like
a named version tag. (fyi HEAD^ equals "next to last commit" so git
"diff HEAD^ HEAD" shows you the diff between the last commit and the
one before it).<br>
<br>
You can see what this is by interrogating the HEAD file in .git
manually for fun. HEAD isnt a branch name like master or <code>6.x-3.x.
Though i can see the point of confusion if im understanding you
correctly.<br>
<br>
<br>
</code>
<pre class="moz-signature" cols="72">--
Michael Favia <a class="moz-txt-link-abbreviated" href="mailto:michael@favish.com">michael@favish.com</a>
tel. 512.669.5650 <a class="moz-txt-link-freetext" href="http://www.favish.com">http://www.favish.com</a>
</pre>
</body>
</html>