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: Markus Armbruster
Subject: Re: [Qemu-devel] updating git tree
Date: Wed, 29 Apr 2009 09:54:13 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

"François Revol" <address@hidden> writes:

>> > 
>> > To commit individual files, use `git add file1.c`, then `git 
>> > commit`  
>> > without -a.
>> > You can check `git status` for what'll get committed.
>> 
>> That I guessed, but there is no way to forbid commiting deleted files 
>> at once...

There is.

git-commit by default commits exactly what you staged in the index.  If
you staged a delete, it'll commit a delete.  If you don't want that,
unstage it, say with git-add or git-reset.

git-commit can also bypass the index.  Just list the files you want to
commit.  If a listed file no longer exists, the commit will remove it.

> So here is what I've did, FWIW:
>
> svn diff > svn-popenaudio.diff
> svn diff > svn-hid.diff
> # vi both to only keep related changes
> cd ..
>
> git clone ...
>
> git apply -p0 < ../svn-hid.diff
> git rm hw/usb-wacom.c
> git commit -a -m "Merge usb-wacom.c into usb-hid.c"
> # argh, git status sayw hw/usb-wacom.c is still here... 
> rm hw/usb-wacom.c
>
> # generate a diff...
> git-format-patch -s origin
> # of course it outputs a stupid mbox format which isn't used everywhere
> # so I must strip the headers if I just need the real patch 
> (overengineering)

If you want a diff, use git-diff.

If you want e-mail ready for sending, use git-format-patch.

> for f in 0???-*; do sed '1,/^$/d' -i "$f"; done
>
> git apply -p0 < ../svn-popenaudio.diff
> # now I should probably finish it first as I don't know how to generate 
> a single merged patch from multiple commits...
> #git add audio/popenaudio.c
> #git commit -a -m "Start of popen(3) audio output"
>
> François.

Me thinks you are still fighting the tool instead of working with it.
No happiness found down that way.




reply via email to

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