Re: Untracked working tree files

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: <david@...>, <git@...>
Date: Wednesday, October 15, 2008 - 4:23 pm

On Wed, 15 Oct 2008 13:08:36 -0700 (PDT)
Linus Torvalds <torvalds@linux-foundation.org> wrote:


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

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

	cd $GIT_TREE
	git checkout "$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"
}

usually invoked as

doit origin v2.6.27
doit origin linux-next

etc.

the above seemed fairly busted, so I'm now using

        git checkout -f "$upstream"
        git reset --hard "$upstream"
        git fetch "$tree" || exit 1

which seems a bit more sensible.  Perhaps I should do the reset before
the checkout, dunno.

That function has been through sooooooo many revisions and each time
some scenario get fixed (more like "improved"), some other scenario
gets busted (more like "worsened").  The above sorta mostly works,
although it presently generates thirty-odd rejects against
git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip.git#auto-latest,
which is way above my fix-it-manually threshold.  linux-next is still
dead because it's taking Stephen over two days to fix the mess he's
been fed so I'm madly rebasing everything on mainline over here.



didn't know about --force.


Yeah, there's no easy solution here, and I suspect the real solution is
"read programmer's mind".  Providing a reliable override (like -f) is a
sensible solution.


OK, I'll try git clean -dqfx if it blows up again.



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Untracked working tree files, Andrew Morton, (Wed Oct 15, 2:56 pm)
Re: Untracked working tree files, , (Wed Oct 15, 3:09 pm)
Re: Untracked working tree files, , (Wed Oct 15, 3:14 pm)
Re: Untracked working tree files, Linus Torvalds, (Wed Oct 15, 3:31 pm)
Re: Untracked working tree files, Andrew Morton, (Wed Oct 15, 3:49 pm)
Re: Untracked working tree files, Linus Torvalds, (Wed Oct 15, 4:08 pm)
Re: Untracked working tree files, Linus Torvalds, (Wed Oct 15, 4:23 pm)
Re: Untracked working tree files, Junio C Hamano, (Wed Oct 15, 6:06 pm)
Re: Untracked working tree files, Andrew Morton, (Wed Oct 15, 4:30 pm)
Re: Untracked working tree files, Andrew Morton, (Wed Oct 15, 4:23 pm)
Re: Untracked working tree files, Paolo Ciarrocchi, (Thu Oct 16, 4:42 am)
Re: Untracked working tree files, Andrew Morton, (Thu Oct 16, 5:32 am)
Re: Untracked working tree files, , (Wed Oct 15, 3:42 pm)
Re: Untracked working tree files, Linus Torvalds, (Wed Oct 15, 3:56 pm)
Re: Untracked working tree files, , (Wed Oct 15, 4:17 pm)
Re: Untracked working tree files, Andrew Morton, (Wed Oct 15, 3:26 pm)
Re: Untracked working tree files, Nicolas Pitre, (Wed Oct 15, 3:32 pm)
Re: Untracked working tree files, Nicolas Pitre, (Wed Oct 15, 3:34 pm)
Re: Untracked working tree files, Andrew Morton, (Wed Oct 15, 3:24 pm)