What is the format of a patch file?

前端 未结 4 904
南旧
南旧 2020-12-08 06:11

What does the following mean ?

diff -rBNu src.orig/java/org/apache/nutch/analysis/NutchAnalysisConstants.java src/java/org/apache/nutch/analysis/NutchAnalysi         


        
4条回答
  •  Happy的楠姐
    2020-12-08 06:44

    That depends on what you're asking. Diff shows you the differences between two files. In your case you're diffing NutchAnalysisConstants.java from two different places and generating information about those differences.

    -r to diff means "recursive diff," although in this case it does nothing since you're diffing files, not directories.

    -B means to ignore changes that only involve blank lines.

    -N means that if in directory1 I have a file, but it isn't present in directory2, diff should treat it as if the file is present but empty in directory2 (thus effectively giving you the full contents of the file in directory1).

    -u means to use the unified output format, which is only supported by GNU diff and GNU patch.

    As for what the output means, this link may be useful for you.

提交回复
热议问题