Re: Please pull ACPI updates

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Len Brown <lenb@...>
Cc: Andi Kleen <andi@...>, Jesse Barnes <jbarnes@...>, Rafael J. Wysocki <rjw@...>, Linux Kernel Mailing List <linux-kernel@...>, <linux-acpi@...>
Date: Thursday, July 17, 2008 - 3:12 pm

On Thu, 17 Jul 2008, Len Brown wrote:

Actually, it _is_ easier, although apparently the thing that made it 
easier isn't necessarily widely known or documented.

I'm going to quote your whole sequence, because it's not a really odd 
thing do want to do, and quoting how you do it now also makes the "proper 
git way" actually much more understandable:


No, what others do (if they know the tricks) is to say something like:

	git rebase -i <starting-point>

("-i" is short for "--interactive") where the starting point is just where 
you want to start your work. It might be "origin", or it might be 
"HEAD~30" to say "30 commits ago" or whatever. Anyway, it's basically the 
stable point before the place you want to fix up.

That thing will literally show you the list of commits in an editor, and 
then you can re-order them or mark them for special actions.

The normal action is to "pick" the commit (ie you just cherry-pick it). 
But rather than just picking a commit (remember - you can change the order 
by just editing the list), you can also do

 - "edit": this just basically pauses the rebase after committing the 
    cherry-pick, so that you can then edit things and fix them with "git 
    commit --amend", and when you're happy, you do "git rebase --continue"
    to continue your series.

 - "squash": this squashes the commit in togethr with the previous one, 
   and is very useful together with moving commits around. IOW, maybe you 
   committed a fix to a previous commit, and want to integrate the fix 
   into the original commit - in that case you'd move the commit in the 
   list up to just after the commit you want to fix, and change the "pick" 
   into a "squash"

so it actually makes doing what you do above by hand much easier.

[ Honesty in advertising: I actually don't use this at all. I've tested 
  it, and I think it's very useful, but I have so far mostly ended up 
  doing this by hand in the very few cases I do it at all. Part of the 
  reason is that "git rebase -i" is fairly recent, so it's not part of my 
  normal tool set.

  But the bigger reason is that obviously all the commits I tend to do are 
  just merges, and I don't maintain "patch series" in my trees except 
  sometimes for git itself ]

Git rebase can also try to rebase merges (the "-p" flag - short form of 
"--preserve-merges"), so this _does_ work with a non-linear history too to 
some degree, but quite frankly, I would seriously suggest people try to 
avoid getting quite that funky with it. It's useful for emergencies, but 
you'd better know what you are doing, and you should look at the 
before-and-after state very carefully.

			Linus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Please pull ACPI updates, Andi Kleen, (Wed Jul 16, 5:45 pm)
Re: Please pull ACPI updates, Rafael J. Wysocki, (Wed Jul 16, 6:11 pm)
Re: Please pull ACPI updates, Jesse Barnes, (Wed Jul 16, 7:33 pm)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 2:47 am)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 11:18 am)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 11:47 am)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 12:23 pm)
Re: Please pull ACPI updates, Ray Lee, (Thu Jul 17, 3:11 pm)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 3:49 pm)
Re: Please pull ACPI updates, Ray Lee, (Thu Jul 17, 4:11 pm)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 4:29 pm)
Re: Please pull ACPI updates, , (Fri Jul 18, 2:39 am)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 4:01 pm)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 4:16 pm)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 4:34 pm)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 4:28 pm)
Re: Please pull ACPI updates, Olivier Galibert, (Fri Jul 18, 9:25 am)
Re: Please pull ACPI updates, Ray Lee, (Fri Jul 18, 11:57 am)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 4:14 pm)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 12:02 pm)
Re: Please pull ACPI updates, Linus Torvalds, (Wed Jul 16, 7:45 pm)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 2:40 am)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 11:03 am)
Re: Please pull ACPI updates, Len Brown, (Thu Jul 17, 2:49 pm)
Re: Please pull ACPI updates, J. Bruce Fields, (Thu Jul 17, 5:15 pm)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 3:12 pm)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 3:16 pm)
Re: Please pull ACPI updates, Harvey Harrison, (Thu Jul 17, 3:12 pm)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 3:50 pm)
Re: Please pull ACPI updates, Jesse Barnes, (Wed Jul 16, 7:51 pm)
Re: Please pull ACPI updates, Linus Torvalds, (Wed Jul 16, 8:32 pm)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 2:45 am)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 11:06 am)
Re: Please pull ACPI updates, Linus Torvalds, (Wed Jul 16, 8:53 pm)
Re: Please pull ACPI updates, Jesse Barnes, (Wed Jul 16, 10:26 pm)
Re: Please pull ACPI updates, Linus Torvalds, (Wed Jul 16, 10:56 pm)