From: Linus Torvalds <torvalds@osdl.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Michal Ludvig <michal@logix.cz>,
linux-crypto@vger.kernel.org, git@vger.kernel.org
Subject: Re: Creating diff from 2.6.16 from cryptodev-2.6 git tree
Date: Thu, 29 Jun 2006 19:25:01 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0606291904250.12404@g5.osdl.org> (raw)
In-Reply-To: <20060630013627.GA27527@gondor.apana.org.au>
On Fri, 30 Jun 2006, Herbert Xu wrote:
>
> On Fri, Jun 30, 2006 at 01:18:24PM +1200, Michal Ludvig wrote:
> >
> > just a quick question: how can I create a patch with all changes in
> > cryptodev-2.6 tree against tag v2.6.16 in Linus tree? I've got
> > git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
> > cloned here and want to extract all your commits in this tree since
> > 2.6.16. Is there a way to do it in Git/Cogito?
>
> OK, it's easier if you break this into three problems.
>
> You start by getting all the changes merged right after 2.6.16. This
> can be done by locating the merge changeset in Linus's tree. It looks
> like this:
Actually, there are certainly other, potentially easier, ways to do this.
It depends a bit on what Michal wants, though. Since the current trees
(both mine and the cryptodev tree) have been merging things back and
forth, it's _not_ as easy as just saying "pick all commits that exist in
one branch but not the other", but depending on what Michal wants to do,
git gives other ways to prune out just the info he wants.
The easiest by far is if you only care about a certain sub-directory.
Then, assuming the branch "crypto" is the top-most commit of the cryptodev
repo, just do
git diff v2.6.16..crypto -- crypto/
and that will give you a diff of all the changes since v2.6.16 inside that
subdirectory. That may or may not be sufficient and what Michal wants.
Now, the cryptodev-2.6.git tree doesn't even contain the v2.6.16 tags, but
you can fix that by just doing
git fetch --tags git://git.kernel.org//pub/scm/linux/kernel/git/torvalds/linux-2.6
even if your clone is actually from just the cryptodev-2.6 archive.
Alternatively, if you want to see the individual changes, you can just do
git log -p --full-diff v2.6.16..crypto -- crypto/
which shows you all the commits that changed the crypto/ subdirectory, AND
it shows the other changes those same commits did to other subdirectories
too (which is usually something you want in a case like this).
Finally, what you can also do is that instead of matching for stuff that
changed the crypto/ subdirectory, you could try to match commits where the
committer is somebody special, eg Herbert Xu. We don't have that kind of
thing automated, but here's one way to do it:
git-rev-list --header v2.6.16..crypto |
grep -z 'committer Herbert Xu' |
tr '\0' '\n' |
sed -n '/^[a-f0-9][a-f0-9]*$/p' |
git diff-tree --pretty -p --stdin |
less -S
where the "git-rev-list --header | grep -z" part picks out any commits
committed by Herbert, the "tr '\0' '\n' | sed -n" part then picks up just
the commit ID's from those lines, and the "git-diff-tree" part then shows
those commits as diffs.
(The above should really be quite possible to shorten as
git log -p --committer="Herbert Xu"
but we don't actually support git-rev-list doing matching on
committer/author names - although it should be easy to do in case somebody
wants to have a small git project to get their toes wet, hint hint)
Linus
next prev parent reply other threads:[~2006-06-30 2:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-30 1:18 Creating diff from 2.6.16 from cryptodev-2.6 git tree Michal Ludvig
2006-06-30 1:36 ` Herbert Xu
2006-06-30 2:25 ` Linus Torvalds [this message]
2006-06-30 2:32 ` Herbert Xu
2006-06-30 2:44 ` Linus Torvalds
2006-06-30 3:05 ` Michal Ludvig
2006-06-30 5:45 ` Michal Ludvig
2006-06-30 6:20 ` Linus Torvalds
2006-06-30 6:28 ` Junio C Hamano
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=Pine.LNX.4.64.0606291904250.12404@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=git@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=michal@logix.cz \
/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).