git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Jay Cliburn <jacliburn@bellsouth.net>
Cc: git@vger.kernel.org
Subject: Re: Updated Kernel Hacker's guide to git
Date: Thu, 21 Dec 2006 06:53:22 -0500	[thread overview]
Message-ID: <458A75B2.6050201@garzik.org> (raw)
In-Reply-To: <4589FD9E.2010000@bellsouth.net>

Jay Cliburn wrote:
> Jeff Garzik wrote:
>> 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.
> 
> Thanks for doing this.  I've referred to your previous page rather often 
> as I grope around trying to learn git and hack a vendor driver for 
> submittal into the mainline kernel.
> 
> One thing that baffled me was how to use git to create a "kitchen sink" 
> diff that would produce my entire driver suitable for submittal to lkml 
> for review.  This probably isn't needed very often, but for new driver 
> submittals it's important to know how to do it.  Francois Romieu showed 
> me how (assume the new driver branch is named "driver"):
> 
> $ git diff $(git merge-base master driver)..driver
> 
> As a beginner, this command continues to be utterly non-intuitive to me, 
> but it works.  There may be other ways to do it, too.
> 
> The point is, I think you should add instructions on your cookbook that 
> address how to produce such a "kitchen sink" diff if you're submitting a 
> brand new driver to lkml.  (Obviously I don't know what such a diff is 
> actually called.)

You inflict upon yourself all sorts of pain if you keep updating 
'master', but don't merge that into 'driver'.  Typically you want to 
rebase after updating master:

	git checkout driver
	git rebase master
	# build and test
	git prune

or merge master into your current branch:

	git checkout driver
	git pull . master
	# build and test

That way, you are GUARANTEED that

	git diff master..driver

will result in a diff that you can send upstream.

One moral of this story, as (I think) Linus mentioned, don't update 
'master' too frequently.  That's one key lesson of distributed 
programming.  Unless the upstream kernel has a key API change or bug fix 
you need, just pretend the outside world does not exist, and hack away 
on your driver.

	Jeff

  parent reply	other threads:[~2006-12-21 11:53 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=458A75B2.6050201@garzik.org \
    --to=jeff@garzik.org \
    --cc=git@vger.kernel.org \
    --cc=jacliburn@bellsouth.net \
    /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).