git - Why there is not function name after @@ when I use jgit to get difference? -
when use jgit acquire difference between 2 files, can deference this:
diff --git a/src/core/ngx_output_chain.c -wsrc/core/ngx_output_chain.c index 554fe1b..6bb463a 100644 --- a/src/core/ngx_output_chain.c +++ -wsrc/core/ngx_output_chain.c @@ -377,8 +377,9 @@ dst->in_file = 0; }
but there not function name after @@ use git diff.
how can function name when use jgit?
there's no function name in diffs produced jgit
because, well, feature not supported jgit
.
relevant lines org.eclipse.jgit/src/org/eclipse/jgit/diff/diffformatter.java:
protected void writehunkheader(int astartline, int aendline, int bstartline, int bendline) throws ioexception { out.write('@'); out.write('@'); writerange('-', astartline + 1, aendline - astartline); writerange('+', bstartline + 1, bendline - bstartline); out.write(' '); out.write('@'); out.write('@'); out.write('\n'); }
you can raise issue on bug tracker , maybe try implement feature yourself if it.
Comments
Post a Comment