git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: git@vger.kernel.org
Subject: my git problem
Date: Sun, 27 Apr 2008 11:29:38 -0700	[thread overview]
Message-ID: <20080427112938.4dbe8e2a.akpm@linux-foundation.org> (raw)


git is really really bad to me during the merge window.  Let's look at an
example:

y:/usr/src/git26> cat .git/branches/git-ia64 
git+ssh://master.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6.git#test

Now, I want to generate a plain patch against mainline which will add the
patches which are in git-ia64 and which aren't in mainline.  ie: when that
patch is applied to mainline, we get git-ia64.  Sounds simple.

A naive

	git-diff origin git-ia64

generates vast amounts of stuff which is already in mainline.  Things like

 b/drivers/media/video/au0828/au0828-dvb.c       |    2 
 b/drivers/media/video/au0828/au0828-i2c.c       |    6 
 b/drivers/media/video/au0828/au0828.h           |    8 
 b/drivers/media/video/cx23885/cx23885-dvb.c     |    4 
 b/drivers/media/video/cx88/Kconfig              |    1 
 b/drivers/media/video/cx88/cx88-blackbird.c     |    6 
 b/drivers/media/video/cx88/cx88-cards.c         |    1 
 b/drivers/media/video/cx88/cx88-dvb.c           |   32 
 b/drivers/media/video/em28xx/em28xx-core.c      |    2 
 b/drivers/media/video/ir-kbd-i2c.c              |   21 
 b/drivers/media/video/pvrusb2/Kconfig           |    1 


The appended script is what I usually use.  It was worked out by Junio and
I maybe a couple of years ago. It doesn't work very well: it still generates
large numbers of changes which are already in mainline.  Some of them are
ia64 changes, some are not.

When Tony resyncs his tree with mainline this problem will correct itself. 
I drop the tree and repoll it daily until this happens.


I don't really have a bottom line here - but I would like the git
developers to be aware that what is a fairly sensible usage scenario just
doesn't seem to be satisfied at all well...

Thanks.



#!/bin/sh

GIT_TREE=/usr/src/git26
PULL=/usr/src/pull

git_header()
{
	tree="$1"
	echo GIT $(cat .git/refs/heads/$tree) $(cat .git/branches/$tree)
	echo
}

doit()
{
	tree=$1
	upstream=$2

	cd $GIT_TREE
	git reset --hard "$upstream"
	git fetch "$tree" || exit 1
	git merge --no-commit 'test merge' HEAD FETCH_HEAD > /dev/null

	{
		git_header "$tree"
		git log --no-merges ORIG_HEAD..FETCH_HEAD
		git diff --patch-with-stat ORIG_HEAD
	} >$PULL/$tree.patch
	{
		echo DESC
		echo $tree.patch
		echo EDESC
		git_header "$tree"
		git log --no-merges ORIG_HEAD..FETCH_HEAD
	} >$PULL/$tree.txt
	git reset --hard "$upstream"
}

mkdir -p $PULL

if [ $1"x" = "-x" ]
then
	exit
fi

cd /usr/src

if [ $# == 0 ]
then
	trees=/usr/src/git-trees
else
	trees="$1"
fi

do_one()
{
	tree=$1
	upstream=$2
	if [ ! -e $PULL/$tree.patch ]
	then
		echo "*** doing $tree, based on $upstream"
		git-branch -D $tree
		doit $tree $upstream
	else
		echo skipping $tree
	fi
}
	
if [ $# == 2 ]
then
	do_one $1 $2
else
	while read x
	do
		if echo $x | grep '^#.*' > /dev/null
		then
			true
		else
			do_one $x
		fi
	done < $trees
fi

             reply	other threads:[~2008-04-27 18:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-27 18:29 Andrew Morton [this message]
2008-04-27 19:15 ` my git problem Linus Torvalds
2008-04-27 19:44   ` Andrew Morton
2008-04-27 20:24     ` Linus Torvalds
2008-04-28 18:45       ` Andrew Morton
2008-04-28 18:49         ` Johannes Schindelin
2008-04-28 19:09           ` Andrew Morton
2008-04-28 19:13             ` Johannes Schindelin
2008-04-28 19:28               ` Linus Torvalds
2008-04-29 17:15                 ` J. Bruce Fields
2008-04-30  8:17                   ` Jakub Narebski
2008-04-28 19:33               ` Andrew Morton
2008-04-28 19:21         ` Linus Torvalds
2008-04-28 19:54           ` Andrew Morton
2008-05-01  6:01           ` Carl Worth
2008-04-28 19:52         ` Daniel Barkalow
2008-04-28 21:35       ` Andrew Morton
2008-04-28 21:47         ` Linus Torvalds
2008-04-28 22:04           ` Johannes Schindelin
2008-04-28 22:14           ` Linus Torvalds
2008-04-29  2:14             ` Andrew Morton

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=20080427112938.4dbe8e2a.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=git@vger.kernel.org \
    /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).