Forum Discussion

michalr's avatar
michalr
Occasional Contributor
13 years ago

Multi-file diff format missing Index line

Hi,



when I download diff for the whole review from the main review page using the "Download diff" button, the resulting diff file is missing "Index:  path to file" line at the beginning of the changes for a modified file. Without Index line I am unable to apply the patch in eclipse. It seems to me that eclipse requires this Index line because it is defined by the diff standard, so is this a bug in CC? Anyway I have 50 files in a review what can I do to be able to apply the multi-file diff in eclipse?



Many Thanks,

Michal
  • Anonymous's avatar
    Anonymous
    Hi Michael,



      What 'diff standard' are you looking at?  we generate unified diffs, which don't include such a line.  Files in a unified diff are delimited by

    +++ /path/to/current/file

    --- /path/to/original/file



    So that's what we generate.
  • michalr's avatar
    michalr
    Occasional Contributor
    Thanks for the answer.



    I was unable to find better specification so I was referring to http://en.wikipedia.org/wiki/Diff#Unified_format which is mentioning that in case of multiple files Index line is used as a separator.



    Also Eclipse user guide states that Apply Patch functionality works only with unified format and when I added Index lines to the CC diff I was able to apply it successfully. But maybe I am doing something wrong, are you able to apply multi-file patch from CC in Eclipse?



    Btw. do you happen to have a link to the unified format specification describing the file separation? I would like to post a question on an eclipse forum and provide the specs.



    Thanks,

    Michal