threads / discuss / 1578

RE: git-whatchanged -p anomoly?

Subject: RE: git-whatchanged -p anomoly?

## tl;dr

3 messages between Aug 18, 2005 and Aug 18, 2005.

replies: 2people: 3as markdown or json

Luck, Tony· Aug 18, 2005, 22:44 UTC · lore
Show 8 quoted lines
>Now, I suspect you didn't mean to commit that thing: it really looks like 
>you've mixed up your patches somehow, because the commit message seems to 
>match only a very small portion of the patch.
>
>Did you perhaps have a failed merge or something that was in your index 
>when you applied that patch? If you have a dirty index when you do 
>"git-applymbox", it the commit done as part of the applymbox might commit 
>other state too.

Yes I had a failed merge ... I thought that I had cleaned up from it, but clearly I hadn't. Bother.

I guess I have a bit of tree maintenance to do ... But I think that it should be easy ... I can just step "test" back to before I merged in the Alex patch. Redo the Alex patch properly. Then re-merge all the branches that happened after this. Followed by crossing my fingers and running "git prune".

Maybe I'll try all that in a *copy" of my GIT tree first!
-Tony
Linus Torvalds· Aug 18, 2005, 23:04 UTC · re: Luck, Tony · lore
On Thu, 18 Aug 2005, Luck, Tony wrote:
> 
> Yes I had a failed merge ... I thought that I had cleaned up from it, but
> clearly I hadn't.  Bother.

The simplest way of cleaning up after a failed merge is just a simple "git reset", which will also tell you if you need to perhaps clean up afterwards (equally easily done with "git checkout -f" if you just want to blow all the changes away.

Show 7 quoted lines
> I guess I have a bit of tree maintenance to do ... But I think that it
> should be easy ... I can just step "test" back to before I merged in
> the Alex patch.  Redo the Alex patch properly.  Then re-merge all the
> branches that happened after this.  Followed by crossing my fingers and
> running "git prune".
> 
> Maybe I'll try all that in a *copy" of my GIT tree first!
Yup. Think of it as a good exercise in git ;)

Btw, it's a shame that git has all these "git rebase" etc helper scripts, which rebase whole series of patches, but the simple "git re-do" which basically ends up being a

	git-diff-tree -p $old | git-apply --index &&
		git commit --reedit=$old
doesn't have a nice helper script.
Anyway, the easiest approach may be to just do
	git branch new-test-branch <good-point>
	git format-patch -o patchdir --mbox <good-point>
	git checkout new-test-branch
	.. edit the individual patches in patchdir/* to taste ..
	cat git-applymbox patchdir/* | git-applymbox
or similar. 
		Linus
Johannes Schindelin· Aug 18, 2005, 23:47 UTC · re: Linus Torvalds · lore
Hi,
On Thu, 18 Aug 2005, Linus Torvalds wrote:
Show 6 quoted lines
> Btw, it's a shame that git has all these "git rebase" etc helper scripts, 
> which rebase whole series of patches, but the simple "git re-do" which 
> basically ends up being a
> 
> 	git-diff-tree -p $old | git-apply --index &&
> 		git commit --reedit=$old
How about "git-cherry-pick-script"? Junio?

Ciao, Dscho

← back to recent threads