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

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -