Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

quilt patch with a new file

Tags:

patch

quilt

I'm trying to create a new quilt patch with only one file added. Unfortunately the file seems to be ignored.

I did quilt new some_patch and quilt add some_file. I can see the file in quilt files then, but when I refresh, I get back:

Nothing in patch some_patch

After I pop some_patch, the added file is not removed and nothing is actually saved into the patch (patch file is not created).

What am I doing wrong here?

like image 922
viraptor Avatar asked Dec 21 '10 12:12

viraptor


3 Answers

You have to add the file to quilt first, before writing it. So that quilt can track the difference. If you add it after writing it, there is no change after that.

like image 62
Steffen Avatar answered Oct 08 '22 23:10

Steffen


Move new files aside, "add" names of files, then move files back.

$ quilt files |while read filename; do quilt remove "$filename"; mv "$filename" t; quilt add "$filename"; mv t "$filename"; done    
$ quilt refresh   
$ quilt diff
like image 21
Chad Miller Avatar answered Oct 08 '22 22:10

Chad Miller


Remember that you should add the file before changing it, otherwise, you will not the difference, once there will be no difference between the time you added it and the time you run the diff. That is what the quilt diff shows.

like image 21
Breno Leitão Avatar answered Oct 09 '22 00:10

Breno Leitão