git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Updated Kernel Hacker's guide to git
@ 2006-12-21  3:04 Jeff Garzik
  2006-12-21  3:21 ` Jay Cliburn
                   ` (6 more replies)
  0 siblings, 7 replies; 45+ messages in thread
From: Jeff Garzik @ 2006-12-21  3:04 UTC (permalink / raw)
  To: Linux Kernel; +Cc: Git Mailing List

I refreshed my git intro/cookbook for kernel hackers, at 
http://linux.yyz.us/git-howto.html

This describes most of the commands I use in day-to-day kernel hacking. 
  Let me know if there are glaring errors or missing key commands.

	Jeff

^ permalink raw reply	[flat|nested] 45+ messages in thread
* Re: Updated Kernel Hacker's guide to git
@ 2006-12-21 12:24 Francis Moreau
  2006-12-21 18:23 ` Linus Torvalds
  0 siblings, 1 reply; 45+ messages in thread
From: Francis Moreau @ 2006-12-21 12:24 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Jay Cliburn, git, Jeff Garzik

Hi,

[ sorry for breaking up the thread but I'd like to fully
  understand that point and I just subscribed to git mail
  list... ]

Linus Torvalds wrote:
>
> On Wed, 20 Dec 2006, Jay Cliburn wrote:
>> $ git diff $(git merge-base master driver)..driver
>
> Be careful. This ONLY works if you don't have criss-cross merges etc, so
> you need to be somewhat careful about it. If you end up having a complex
> merge history between the origin branch and your development tree, things
> will stop working
>
> So it's actually worth understanding what the above does.
>
> Here's the picture to keep in mind: you started off with something like
> this:
>
> 	<- older			newer ->
>
> 	..--A---B---C---D
>
> where the top commit was D, and you started doing your own work off there.
> However, the tree you are tracking (doing "git fetch origin" or somethng)
> ALSO continues, so soon enough you'll have a history that looks like
>
> 	<- older			newer ->
>
> 	..--A---B---C---D---E---F---G---H <-"origin"
> 	                 \
> 	                  --X---Y---Z <- your "driver" branch"
>
> where your work is the "X-Y-Z" sequence.
>
> How, the reason you must NOT do
>
> 	git diff origin..driver
>
> or something like that, is that it will LITERALLY do a diff between those
> two heads. And while that is a perfectly normal diff, it's not what you
> want: it's the diff between the up-stream work and yours, and it will show
> that a lot of work has _not_ happened in your branch (all the E-F-G-H
> stuff), and then you've added some work (X-Y-Z).

I must really miss something but is a diff between origin and driver heads
achieved by:

	$ git diff driver origin

instead of:

	$ git diff origin..driver

?

>From the git-rev-list documentation I can read that:

	git-rev-list origin..driver == git-rev-list driver ^origin

I assume it's still true for git-diff. And the documentation says that
the above command "lists all the commits which are included in driver,
but not in origin".

So all commits included in driver are: (A-B-C-D-X-Y-Z)
all commits included in origin are: (A-B-C-D-E-F-G-H)

All the commits which are included in driver, but not in origin are:
(X-Y-Z), which is definitely not what you claimed.

I know that I'm wrong, so please shed some light in my stupid brain.

-- 
Francis

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

end of thread, other threads:[~2008-07-03  8:25 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-21  3:04 Updated Kernel Hacker's guide to git Jeff Garzik
2006-12-21  3:21 ` Jay Cliburn
2006-12-21  7:04   ` Martin Langhoff
2006-12-21  7:32     ` Junio C Hamano
2006-12-21  7:51   ` Linus Torvalds
2006-12-21 11:53   ` Jeff Garzik
2006-12-21  5:44 ` Willy Tarreau
2006-12-21  5:53 ` Nigel Cunningham
2006-12-21 11:44   ` Jeff Garzik
2006-12-21 21:17     ` Nigel Cunningham
2006-12-21 13:53 ` Francois Romieu
2006-12-21 20:40 ` Guennadi Liakhovetski
2006-12-21 20:46   ` Jeff Garzik
2006-12-22  8:50 ` Jesper Juhl
2006-12-24 18:07 ` Horst H. von Brand
2007-12-23 11:13   ` Jeff Garzik
2007-12-23 12:08     ` Robert P. J. Day
2007-12-23 12:13       ` Jeff Garzik
2007-12-23 12:20         ` Robert P. J. Day
2007-12-23 13:05           ` Dieter Ries
2007-12-23 17:23             ` Robert P. J. Day
2007-12-23 20:14             ` Stefan Richter
2007-12-24 14:19             ` Robert P. J. Day
2007-12-23 12:25     ` WANG Cong
2007-12-24 12:50     ` Miklos Vajna
2007-12-25 13:08     ` Salikh Zakirov
2007-12-31  2:50     ` Jan Engelhardt
2007-12-31 11:26       ` Stefan Richter
2007-12-31 17:31         ` Junio C Hamano
2008-06-30  2:51         ` Jeff Garzik
2008-06-30  6:27           ` Stefan Richter
2008-06-30  2:49       ` Jeff Garzik
2008-07-03  6:26         ` Christian Couder
  -- strict thread matches above, loose matches on Subject: below --
2006-12-21 12:24 Francis Moreau
2006-12-21 18:23 ` Linus Torvalds
2006-12-22  1:23   ` Carl Worth
2006-12-22  4:13     ` Linus Torvalds
2006-12-22 22:20       ` Carl Worth
2006-12-22 22:34         ` Linus Torvalds
2006-12-22 22:45         ` Junio C Hamano
2006-12-22 23:31           ` Carl Worth
2006-12-22 23:00         ` Jakub Narebski
2006-12-22  9:35   ` Francis Moreau
2006-12-22 10:26     ` Junio C Hamano
2006-12-22 20:34       ` Francis Moreau

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).