git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: lamikr <lamikr@cc.jyu.fi>
Cc: git@vger.kernel.org
Subject: Re: Diff between the non-head git work dir and non-git kernel sources
Date: Tue, 08 Nov 2005 14:18:56 -0800	[thread overview]
Message-ID: <7vacgeeqb3.fsf@assigned-by-dhcp.cox.net> (raw)
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 tip

Is 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-lamikr

would 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.

  reply	other threads:[~2005-11-08 22:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-08 20:54 Diff between the non-head git work dir and non-git kernel sources lamikr
2005-11-08 22:18 ` Junio C Hamano [this message]
2005-11-08 23:52   ` lamikr

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=7vacgeeqb3.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=lamikr@cc.jyu.fi \
    /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;
as well as URLs for NNTP newsgroup(s).