Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[orion-dev] Git Diff with showNameAndStatusOnly

Hi,


In the Git API, is the DiffCommand’s showNameAndStatusOnly option actually implemented? There’s a setter, and call() uses the instance variable. However, nothing is written to the output stream (a null os instance is used instead) if the showNameAndStatusOnly flag is set—the DiffFormatter doesn’t implement the flag. The list of DiffEntry objects, which is correctly set, is returned but that list is never used by the GitDiffHandler.


If I’m implementing this, should I implement the flag in the DiffFormatter, branching on the flag in format(DiffEntry ent)? Alternatively, I think it would be better to return a JSON object with the list of changes, as this information isn’t actually textual in nature (besides the filenames and status keys). In that case, could GitDiffHandlerV1.handleGetDiff branch on the flag, returning a list of file names and change types?


Thanks,

Diana


Back to the top