mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Mike Travis <travis@sgi.com>
Cc: Yinghai Lu <yinghai@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: arch_probe_nr_irqs
Date: Thu, 15 Jan 2009 10:49:38 +0100	[thread overview]
Message-ID: <20090115094938.GB5833@elte.hu> (raw)
In-Reply-To: <496E587E.6010503@sgi.com>


* Mike Travis <travis@sgi.com> wrote:

> Very cool, thanks!!
> 
> The one thing I always get hung up on is what args to use with the git 
> rebase -i command.  Say I want to edit 4a046d1 (which I do ;-), I see it 
> in my repo with git-log (3rd one down):

You shouldnt edit 4a046d1 anymore as i already pulled it - you can queue 
up a fix commit. (Or we can decide to drop the whole tree and re-pull 
yours - but that is an emergency path not to be taken lightly.)

Btw., to 'edit' your own commits, you can always do something like this. 
For example, if this is the current lineup of your own commits (not yet 
pulled by anyone):

 a4a0acf: x86: fix broken flush_tlb_others_ipi()
 28e0886: xen: fix too early kmalloc call
 92296c6: cpumask, irq: non-x86 build failures
 542d865: kstat: modify kstat_irqs_legacy to be variable sized
 9332fcc: irq: initialize nr_irqs based on nr_cpu_ids
 0fa0ebb: irq: allocate irq_desc_ptrs array based on nr_irqs
 e2f4d06: irq: use WARN() instead of WARN_ON().

... and you realize that there's a bug in the middle, at 542d865, that 
you'd like to fix locally before pushing it out for others to pull.

In this case you can rebase and fix in "two phases". The first phase is to 
'reorder commits':

  git rebase -i 542d865^1

i.e. you start your rebase _from before_ the commit in question. All old 
history will be preserved (which is always good - you always want the 
minimum rebase - avoid full rebases as much as possible).

You will be offered this git-rebase screen:

 pick 542d865 kstat: modify kstat_irqs_legacy to be variable sized
 pick 92296c6 cpumask, irq: non-x86 build failures
 pick 28e0886 xen: fix too early kmalloc call
 pick a4a0acf x86: fix broken flush_tlb_others_ipi()

Edit it to move the first line to the last, like this:

 pick 92296c6 cpumask, irq: non-x86 build failures
 pick 28e0886 xen: fix too early kmalloc call
 pick a4a0acf x86: fix broken flush_tlb_others_ipi()
 pick 542d865 kstat: modify kstat_irqs_legacy to be variable sized

and run the rebase. Now you'll have a new lineup with the buggy commit at 
the end. (lets assume there were no conflicts caused by the reordering) 
For example you could get:

 b304542: kstat: modify kstat_irqs_legacy to be variable sized
 d398631: x86: fix broken flush_tlb_others_ipi()
 ab6211f: xen: fix too early kmalloc call
 ef3b48b: cpumask, irq: non-x86 build failures
 9332fcc: irq: initialize nr_irqs based on nr_cpu_ids
 0fa0ebb: irq: allocate irq_desc_ptrs array based on nr_irqs
 e2f4d06: irq: use WARN() instead of WARN_ON().

note how there's new commit IDs starting at ef3b48b - but all previous 
commits (9332fcc, 0fa0ebb, e2f4d06) were preserved.

Now comes 'phase 2': the problematic commit is at the end of the lineup 
and you can fix it in multiple development steps, by editing the buggy 
source and adding it to the commit via:

   git add kernel/file.c
   git commit --amend

Ok?

( Or if you are sure you can fix the bug via a single pass, you can change 
  the 'pick' line to 'edit' and do the editing and 'git commit --amend' 
  right during the rebase. If it's still not perfect it needs another 
  rebase though and it's easy to mess up rebases. )

	Ingo

  reply	other threads:[~2009-01-15  9:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-12  5:42 [PATCH] x86: include apicnum.h in acpidef.h Yinghai Lu
2009-01-12  9:19 ` Ingo Molnar
2009-01-12  9:26   ` Ingo Molnar
2009-01-12  9:27     ` Ingo Molnar
2009-01-12 19:53     ` [PATCH] x86: arch_probe_nr_irqs Yinghai Lu
2009-01-12 23:07       ` Mike Travis
2009-01-14 11:19         ` Ingo Molnar
2009-01-14 19:50           ` Mike Travis
2009-01-14 20:11             ` Ingo Molnar
2009-01-14 21:26               ` Mike Travis
2009-01-15  9:49                 ` Ingo Molnar [this message]
2009-01-15 20:53                   ` Mike Travis
2009-01-15 21:02                     ` Ingo Molnar
2009-01-12 19:09 ` [PATCH] x86: include apicnum.h in acpidef.h Mike Travis

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=20090115094938.GB5833@elte.hu \
    --to=mingo@elte.hu \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=travis@sgi.com \
    --cc=yinghai@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

all inboxes | Powered by JetHome®