qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] updating git tree


From: Laurent Vivier
Subject: Re: [Qemu-devel] updating git tree
Date: Tue, 28 Apr 2009 17:40:15 +0200

Le mardi 28 avril 2009 à 17:22 +0200, Kevin Wolf a écrit :
> Laurent Vivier schrieb:
> > Le mardi 28 avril 2009 à 15:58 +0200, Kevin Wolf a écrit :
> >> François Revol schrieb:
> >>>>> Ah, of course, and I don't have the disk space to upgrade from etch 
> >>>>> to 
> >>>>> lenny...
> >>>>> fun.
> >>>>>
> >>>>> I think I'll just send the diffs from the last svn and be done with 
> >>>>> 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.
> > 
> > No, you can't:
> > 
> > "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.

"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
-- 
------------------ address@hidden  ------------------
"Tout ce qui est impossible reste à accomplir"    Jules Verne
"Things are only impossible until they're not" Jean-Luc Picard





reply via email to

[Prev in Thread] Current Thread [Next in Thread]