From: Andrew Morton <akpm@linux-foundation.org>
To: "Paolo Ciarrocchi" <paolo.ciarrocchi@gmail.com>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>,
david@lang.hm, git@vger.kernel.org
Subject: Re: Untracked working tree files
Date: Thu, 16 Oct 2008 02:32:04 -0700 [thread overview]
Message-ID: <20081016023204.8927325a.akpm@linux-foundation.org> (raw)
In-Reply-To: <4d8e3fd30810160142x36860354ka30375e3d21438ae@mail.gmail.com>
On Thu, 16 Oct 2008 10:42:13 +0200 "Paolo Ciarrocchi" <paolo.ciarrocchi@gmail.com> wrote:
> On Wed, Oct 15, 2008 at 10:23 PM, Andrew Morton
> <akpm@linux-foundation.org> wrote:
> > On Wed, 15 Oct 2008 13:08:36 -0700 (PDT)
> > Linus Torvalds <torvalds@linux-foundation.org> wrote:
> >> On Wed, 15 Oct 2008, Andrew Morton wrote:
> [...]
> >> Is "git checkout -f" part of the scripting? Or "git reset --hard"?
> >
> > well, this script has been hacked on so many times I'm not sure what
> > it does any more.
> >
> > Presently the main generate-a-diff function is
> >
>
> Hi Andrew,
> I was wondering whether you could share the scripts you built on top of git,
> you might get some useful suggestions from this list and they could be
> inspiration for further improvement in GIT (it just happened with this
> thread ;-)
oh gee, you don't want to look. It should all be in
http://userweb.kernel.org/~akpm/stuff/patch-scripts.tar.gz
But really it's just the one script, pull-git-patches, below. That
thing's been hacked around so much that I daren't breathe on it.
Fortunately as long as Stephen Rothwell is producing linux-next I don't
have much need for it any more.
#!/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
}
# maybe use git clean -dqfx
doit()
{
tree=$1
upstream=$2
cd $GIT_TREE
git checkout -f "$upstream"
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"
}
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
}
mkdir -p $PULL
if [ $1"x" = "-x" ]
then
exit
fi
cd $GIT_TREE
git checkout -f master
cd /usr/src
if [ $# == 0 ]
then
trees=/usr/src/git-trees
else
trees="$1"
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
next prev parent reply other threads:[~2008-10-16 9:34 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 18:56 Untracked working tree files Andrew Morton
2008-10-15 19:09 ` david
2008-10-15 19:14 ` david
2008-10-15 19:24 ` Andrew Morton
2008-10-15 19:26 ` Andrew Morton
2008-10-15 19:32 ` Nicolas Pitre
2008-10-15 19:34 ` Nicolas Pitre
2008-10-15 19:31 ` Linus Torvalds
2008-10-15 19:42 ` david
2008-10-15 19:56 ` Linus Torvalds
2008-10-15 20:17 ` david
2008-10-15 19:49 ` Andrew Morton
2008-10-15 20:08 ` Linus Torvalds
2008-10-15 20:23 ` Andrew Morton
2008-10-16 8:42 ` Paolo Ciarrocchi
2008-10-16 9:32 ` Andrew Morton [this message]
2008-10-15 20:23 ` Linus Torvalds
2008-10-15 20:30 ` Andrew Morton
2008-10-15 22:06 ` Junio C Hamano
2008-10-15 23:00 ` [PATCH] reset --hard/read-tree --reset -u: remove unmerged new paths Junio C Hamano
2008-10-15 23:16 ` Linus Torvalds
2008-10-16 6:27 ` Junio C Hamano
2008-10-16 7:20 ` Ingo Molnar
2008-10-16 14:49 ` 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=20081016023204.8927325a.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=david@lang.hm \
--cc=git@vger.kernel.org \
--cc=paolo.ciarrocchi@gmail.com \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.