quilt patch with a new file

主宰稳场 提交于 2019-12-22 03:52:49

问题


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?


回答1:


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.




回答2:


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



回答3:


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.



来源:https://stackoverflow.com/questions/4499130/quilt-patch-with-a-new-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!