Alex Rivera | Logout

Using the output of diff to create the patch

Asked 2009-01-12T22:14:36.477
46

I have something like this

src/sim/simulate.cc
41d40
< #include "mem/mem-interface.h"
90,91d88
<             dram_print_stats_common(curTick/500);
<
src/mem/physical.hh
52d51
<   public:
55,56d53
<       public:
<
58a56,57
>       public:
>
61,62c60,61
<         virtual bool recvTiming(PacketPtr pkt); //baoyg
<
---

I believe this was created using the diff command in a source tree. What I want is to create the patch using that output, and to apply the same changes to my source tree.

Edit
Report

1 Answer

19

If you want to get the same patch output as SVN or git diff, given two different files or folders:

diff -Naur file1.cpp file2.cpp
answered 2009-01-12T22:41:54.190

Your Answer