# RE: git-whatchanged -p anomoly?

3 messages from 2005-08-18 to 2005-08-18. Participants: Luck, Tony, Linus Torvalds, Johannes Schindelin.
Thread: https://gitlist.dev/t/1578

## Luck, Tony, 2005-08-18 22:44

Subject: RE: git-whatchanged -p anomoly?
Message-ID: <B8E391BBE9FE384DAA4C5C003888BE6F042C819D@scsmsx401.amr.corp.intel.com>
URL: https://gitlist.dev/e/B8E391BBE9FE384DAA4C5C003888BE6F042C819D%40scsmsx401.amr.corp.intel.com

```

>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, 2005-08-18 23:04

Subject: RE: git-whatchanged -p anomoly?
Message-ID: <Pine.LNX.4.58.0508181555370.3412@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.58.0508181555370.3412%40g5.osdl.org
In-Reply-To: <B8E391BBE9FE384DAA4C5C003888BE6F042C819D@scsmsx401.amr.corp.intel.com>

```


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.

> 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, 2005-08-18 23:47

Subject: RE: git-whatchanged -p anomoly?
Message-ID: <Pine.LNX.4.63.0508190146150.8295@wgmdd8.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0508190146150.8295%40wgmdd8.biozentrum.uni-wuerzburg.de
In-Reply-To: <Pine.LNX.4.58.0508181555370.3412@g5.osdl.org>

```
Hi,

On Thu, 18 Aug 2005, Linus Torvalds wrote:

> 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

```
