From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LypMY-0003G7-K4 for qemu-devel@nongnu.org; Tue, 28 Apr 2009 11:36:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LypMT-00035x-0W for qemu-devel@nongnu.org; Tue, 28 Apr 2009 11:36:49 -0400 Received: from [199.232.76.173] (port=38727 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LypMS-00035g-QN for qemu-devel@nongnu.org; Tue, 28 Apr 2009 11:36:44 -0400 Received: from ecfrec.frec.bull.fr ([129.183.4.8]:44579) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LypMS-0004uX-7m for qemu-devel@nongnu.org; Tue, 28 Apr 2009 11:36:44 -0400 Subject: Re: [Qemu-devel] updating git tree From: Laurent Vivier In-Reply-To: <49F71F2C.3090508@redhat.com> References: <1340785513-BeMail@laptop> <49F70B6A.8050809@redhat.com> <1240931442.4655.12.camel@frecb07144> <49F71F2C.3090508@redhat.com> Content-Type: text/plain; charset=utf-8 Date: Tue, 28 Apr 2009 17:40:15 +0200 Message-Id: <1240933215.4655.21.camel@frecb07144> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: laurent.desnogues@gmail.com, Christoph.Egger@amd.com, =?ISO-8859-1?Q?Fran=E7ois?= Revol , computers57@hotmail.com, qemu-devel@nongnu.org Le mardi 28 avril 2009 =C3=A0 17:22 +0200, Kevin Wolf a =C3=A9crit : > 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 et= ch=20 > >>>>> to=20 > >>>>> lenny... > >>>>> fun. > >>>>> > >>>>> I think I'll just send the diffs from the last svn and be done wi= th=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 lik= e > >>> > >>> #!/bin/sh > >>> git diff > tmp.patch && patch -R -p1 < tmp.patch && git pull && pat= ch - > >>> 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 g= it > > repository, so "patch -R" will not remove new files whereas "git rese= t > > --hard" will remove them. >=20 > Oops, right, this doesn't work for staged changes (which is the case fo= r > 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. "git pull" will work if the local new file is not created by the pull. BTW, "git reset --hard" is a very dangerous command... Laurent --=20 ------------------ Laurent.Vivier@bull.net ------------------ "Tout ce qui est impossible reste =C3=A0 accomplir" Jules Verne "Things are only impossible until they're not" Jean-Luc Picard