From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lyp9z-0006XS-10 for qemu-devel@nongnu.org; Tue, 28 Apr 2009 11:23:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lyp9u-0006Vo-9y for qemu-devel@nongnu.org; Tue, 28 Apr 2009 11:23:50 -0400 Received: from [199.232.76.173] (port=43541 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lyp9u-0006Vl-2x for qemu-devel@nongnu.org; Tue, 28 Apr 2009 11:23:46 -0400 Received: from mx2.redhat.com ([66.187.237.31]:43498) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lyp9s-0002Lh-1b for qemu-devel@nongnu.org; Tue, 28 Apr 2009 11:23:45 -0400 Message-ID: <49F71F2C.3090508@redhat.com> Date: Tue, 28 Apr 2009 17:22:20 +0200 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] updating git tree References: <1340785513-BeMail@laptop> <49F70B6A.8050809@redhat.com> <1240931442.4655.12.camel@frecb07144> In-Reply-To: <1240931442.4655.12.camel@frecb07144> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier Cc: laurent.desnogues@gmail.com, Christoph.Egger@amd.com, =?UTF-8?B?RnJhbsOnb2lzIFJldm9s?= , computers57@hotmail.com, qemu-devel@nongnu.org Laurent Vivier schrieb: > Le mardi 28 avril 2009 =C3=A0 15:58 +0200, Kevin Wolf a =C3=A9crit : >> Fran=C3=A7ois Revol schrieb: >>>>> Ah, of course, and I don't have the disk space to upgrade from etch= =20 >>>>> to=20 >>>>> lenny... >>>>> fun. >>>>> >>>>> I think I'll just send the diffs from the last svn and be done with= =20 >>>>> it. >>>> you can use: >>>> >>>> git diff > tmp.patch >>>> patch -R -p1 < tmp.patch >>>> git pull >>>> patch -p1 < tmp.patch >>> Ok this seems to work at least for now, I've put it in a script like >>> >>> #!/bin/sh >>> git diff > tmp.patch && patch -R -p1 < tmp.patch && git pull && patch= - >>> p1 < tmp.patch && rm tmp.patch >>> >>> Seems there is a git-revert, not sure how to use it anyway... >>> Oh well... >> git revert is for reverting commits. You can use git reset --hard >> instead of the patch -R though. >=20 > No, you can't: >=20 > "git diff" will create patch for only already existing files in the git > repository, so "patch -R" will not remove new files whereas "git reset > --hard" will remove them. Oops, right, this doesn't work for staged changes (which is the case for new files). But in that case, with patch -R the pull won't work because you still have a modified tree, right? So git diff HEAD should do the trick by including everything in the patch. Kevin