git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* java diffs show no method context
@ 2018-04-25 12:53 Ulrich Windl
  2018-04-25 15:05 ` Alban Gruin
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Windl @ 2018-04-25 12:53 UTC (permalink / raw)
  To: git

Hi!

This is for git 2.13.6, and it may be an FAQ or frequent feature request. Anyway:
I'm new to Java, and writing my first project using Git, I found that "git diff" only reports the class in the diff context, but not the method (as seen for C, for example).
I'd wish to have the method where the diff is located. Here is an example chunk:


@@ -100,6 +119,8 @@ public class PdfParser {
        PdfObject obj, value;
        PdfObjectName name;
        for ( int pos = startIndex; pos < endIndex; pos += 2 ) {
+           if ( (obj = objects.get(pos)).type != PdfObject.Type.Name )
+               exception("Name expected");
            name = (PdfObjectName) obj;
            if ( pos + 1 == endIndex )
                exception("missing value");

The corrsponding definition of the method is like this:

    /**
     * Populate Dictionary with parsed objects
     * @param dict Dictionary to fill
     * @param startIndex Position of first item to add
     * @param endIndex Position of first item not to add
     */
    private void populateDictionary(PdfObjectDictionary dict, int startIndex, in
t endIndex)
    {
...

Regards,
Ulrich





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-04-26  7:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-25 12:53 java diffs show no method context Ulrich Windl
2018-04-25 15:05 ` Alban Gruin
2018-04-26  6:30   ` Antw: " Ulrich Windl
2018-04-26  7:43     ` Ævar Arnfjörð Bjarmason

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).