* gcapatcch equivalent?
@ 2005-08-05 10:59 Dave Airlie
2005-08-05 22:10 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Dave Airlie @ 2005-08-05 10:59 UTC (permalink / raw)
To: linux-kernel
At KS I asked after a gcapatch command for git..
I've got two trees drm-2.6 and linux-2.6, linux-2.6 is latest Linus, so of
course a tree diff gives me all the new patches in linux-2.6 that aren't
in drm-2.6 which isn't what I want.. I want gcapatch....
I'm sure someone has one and I don't really want to care about git
internals :-)
Dave.
--
David Airlie, Software Engineer
http://www.skynet.ie/~airlied / airlied at skynet.ie
Linux kernel - DRI, VAX / pam_smb / ILUG
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gcapatcch equivalent?
2005-08-05 10:59 gcapatcch equivalent? Dave Airlie
@ 2005-08-05 22:10 ` Andrew Morton
2005-08-07 4:38 ` Ryan Anderson
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2005-08-05 22:10 UTC (permalink / raw)
To: Dave Airlie; +Cc: linux-kernel
Dave Airlie <airlied@linux.ie> wrote:
>
>
> At KS I asked after a gcapatch command for git..
>
> I've got two trees drm-2.6 and linux-2.6, linux-2.6 is latest Linus, so of
> course a tree diff gives me all the new patches in linux-2.6 that aren't
> in drm-2.6 which isn't what I want.. I want gcapatch....
>
> I'm sure someone has one and I don't really want to care about git
> internals :-)
I do this, which mostly works:
MERGE_BASE=$(git-merge-base $(cat .git/refs/heads/origin ) \
$(cat .git/refs/heads/$patch_name))
cg-diff -r $MERGE_BASE:$(cat .git/refs/heads/$patch_name) >> \
$PULL/$patch_name.patch
(I'm supposed to be doing real git merges of 40 trees and let git do more
work for me. I'll do that when I'm feeling really, really trusting).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gcapatcch equivalent?
2005-08-05 22:10 ` Andrew Morton
@ 2005-08-07 4:38 ` Ryan Anderson
2005-08-07 7:12 ` Jeff Garzik
0 siblings, 1 reply; 4+ messages in thread
From: Ryan Anderson @ 2005-08-07 4:38 UTC (permalink / raw)
To: Andrew Morton; +Cc: Dave Airlie, linux-kernel
On Fri, Aug 05, 2005 at 03:10:17PM -0700, Andrew Morton wrote:
> I do this, which mostly works:
>
> MERGE_BASE=$(git-merge-base $(cat .git/refs/heads/origin ) \
> $(cat .git/refs/heads/$patch_name))
>
> cg-diff -r $MERGE_BASE:$(cat .git/refs/heads/$patch_name) >> \
> $PULL/$patch_name.patch
>
> (I'm supposed to be doing real git merges of 40 trees and let git do more
> work for me. I'll do that when I'm feeling really, really trusting).
Would something like this make you more comfortable?
You get one repository per tree, but hardlinked objects so space
shouldn't be an issue... and each one works "normally".
All you need to do is setup "origin" as the Linus's tree, then clone
each of the other repositories you want to track, then run this script.
(You *may* want to clone Linus's tree, then edit .git/branches/origin in
each of the sub-trees to save a lot of network bandwidth, but it
shouldn't matter, as the git relink will get you to about the same state
after the first run anyway.)
==========================
#!/bin/sh
repos="agpgart cpufreq net-2.6 sparc-2.6"
rm -rf merged
git clone -l origin merged
for i in $repos ; do echo "../$i" > "merged/.git/branches/$i" ; done
git relink agpgart/ cpufreq/ net-2.6/ sparc-2.6/ merged/ origin/
( cd origin ; git pull origin )
for i in $repos ; do
(
cd "$i"
git pull origin
)
done
cd merged
mkdir -p .git/refs/merge-points/
for i in $repos ; do
cat .git/HEAD > ".git/refs/merge-points/pre-$i"
git pull "$i"
# Note, this should trigger off an error return from git pull
# Unfortunately, git pull always returns an error, so it doesn't
# work quite perfectly - hence this being unconditional.
echo "Please fix up the merge if necessary, commit it, and exit this subshell."
sh
cat .git/HEAD > ".git/refs/merge-points/post-$i"
git diff $(cat .git/refs/merge-points/pre-$i)..$(cat .git/refs/merge-points/post-$i) > "../$i.patch"
done
--
Ryan Anderson
sometimes Pug Majere
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-08-07 7:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-05 10:59 gcapatcch equivalent? Dave Airlie
2005-08-05 22:10 ` Andrew Morton
2005-08-07 4:38 ` Ryan Anderson
2005-08-07 7:12 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®