Re: Updated Kernel Hacker's guide to git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Garzik wrote:
> The kernel hacker's guide to git has received some updates: 
> http://linux.yyz.us/git-howto.html

I have some comments on the contents, though  I need to warn, 
that  I've been following git development for about year and a half now,
and I am not a kernel hacker, so my comments may have wrong bias.

>     Obtain a diff between current branch, and master branch
> 
> In most trees with branches, .git/refs/heads/master contains the
> current 'vanilla' upstream tree, for easy diffing and merging. (in
> trees without branches, 'master' simply contains your latest changes)
> 
> $ git diff master..HEAD

IMHO, syntax 'git diff master HEAD' is preferable, in order to avoid
confusion with 'git log master..HEAD' usage, which has quite different
meaning, roughly expressible as

  git diff `git merge-base master HEAD` HEAD

for getting one big diff of the changes in HEAD since master)

> (this is equivalent to git diff HEAD, when used with HEAD branch)

This seems incorrect to me, as 'git diff master HEAD' compares two
revisions, while 'git diff HEAD' compares working tree with HEAD revision.

Besides, expression 'HEAD branch' is misleading, because HEAD is not a branch by itself,
but rather a link to the latest state of the current branch.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux