Re: Diff between the non-head git work dir and non-git kernel sources
- From
Junio C Hamano <junkio@cox.net>
- Date
- Nov 8, 2005, 22:18 UTC
- Message-ID
- <7vacgeeqb3.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <43711088.6070701@cc.jyu.fi>
lamikr <lamikr@cc.jyu.fi> writes:
Let me understand what trees are involved. I am not sure from your description.
1. You based your own development on some kernel snapshot.
2. The kernel snapshot you based 1. is "some version".
3. Mvista has d24aff0b commit that contains their changes to
a kernel snapshot (the same "some version" as 2). 4. Mvista now has different version, descendant of 3. This is
the top of omap tree you cloned. --------------------------->[2] yours
/
[1]------------->[3]----------->[4] omap tipIs this the commit history graph you have?
> I would now like to revert the sources in git working dir to state that > was after this d24aff0bd3e788d69a45a9d1b1eecda88d847a41 commit > and then make the diff between that kernel source version and my non-git > source version.
You lost me here. Presumably the ultimate goal of what you are doing is either one of the following:
(1) port your good changes between [1] and [2] on top of [4], or
(2) port progresses in omap tree between [3] and [4] (or perhaps
[1] and [4], including changes betwen [1] and [3]) on top of
your tree [2].But I am not sure what you mean by the above paragraph. You sound as if you want to find out the differences between [3] ("revert it to d24aff") and [2] ("your non-git source").
If that is what you want instead, assuming you have your kernel tree in linux-lamikr and omap tree in linux-omap:
$ cd linux-omap
$ git checkout -b snapshot-d24aff0b d24aff0b
$ cd ..
$ diff -ru -X linux-lamikr/Documentation/dontdiff \
linux-omap linux-lamikrwould give you the diff between [3] and [2]; if the difference between [1] and [3] is insignificant, then that diff can be applied to [4]. However, if you have much stuff going on between [1] and [2], applying "single diff containing everything" may turn out to be not so useful.
> 2) Does git-diff support making the diff between git's working dir and > "my non" git kernel source dir. > Or should I just just use normal diff and order that to ignore .git dir > and .gitignore files?
Another possibility would be to move your development to .git; if you know the commit id of [1], then you can branch from that commit and replay your development trail step by step up to [2]. This obviously requires that you used some SCM to keep track your development trail between [1] and [2].
Once you have done that (and assuming your branch is called lamikr), you could compare omap and your tip with:
$ git checkout lamikr $ git diff lamikr origin
Or even merge omap tip into your branch:
$ git checkout lamikr $ git pull . origin
all inside linux-omap/ directory.