Skip to main content

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

DiffCommand is a forked version from JGit that contains some additional functionality that we needed (specifically ignoring white space) - it is not part of the Orion Git API.

If you are curious to see how it is used, please take a look at the JGit source code.

Thanks,
B


From: Diana Chen <dianac@xxxxxxxxxxxx>
To: "orion-dev@xxxxxxxxxxx" <orion-dev@xxxxxxxxxxx>
Date: 07/10/2015 05:02 PM
Subject: [orion-dev] Git Diff with showNameAndStatusOnly
Sent by: orion-dev-bounces@xxxxxxxxxxx





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_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/orion-dev


Back to the top