 **argv);

In your case git diff -U0 would give:
$ git diff -U0 | diff-lines
test.txt:2:+new line here
test.txt:3:+another new line
test.txt:6:-will be removed
test.txt:6:-git repo
test.txt:6:+git

If you just want the line numbers, change the echo "$path:$line:$REPLY" to just echo "$line" and pipe the output through uniq.

A:

I use the --unified=0 option of git diff.
For example, git diff --unified=0 commit1 commit2 outputs the diff:

Because of the --unified=0 option, the diff output shows 0 context lines; in other words, it shows exactly the changed lines.
Now, you can identify the lines that start with '@@', and parse it based on the pattern: 
@@ -startline1,count1 +startline2,count2 @@
Back to the above example, for the file WildcardBinding.java, start from line 910, 0 lines are deleted. Start from line 911, 4 lines are added.

 Q:

In Chrome Native messaging: how long is the native app instance object lifetime?

Does a native application that talks to a Chrome extension is alive for ever? I mean should it be present e.g. before a postback happens? I could not find any configuration for that to add in the manifest file.
I have a page, there are some objects on the page. After clicking an object and sending/receving one message with the Native app, then it no longer works for the rest of objects. 
My exact question: How long is the native app instance object lifetime? Should that object response e.g. forever? Or do I need a loop e.g. to read messages from stdin if this is a continuous communication?
Here is my background script:
var host_name = "files.mffta.java.nativeapp";
var port = null;
initPort();
function initPort() {
    console.log( 'Connecting to native host:'+ host_name );
    port = chrome.runtime.connectNative( host_name );
    port.onMessage.addListener( onNativeMessage );
    port.on
* * argv); 

 In your case git diff -U0 would give: 
 $ git diff -U0 | diff - lines 
 test.txt:2:+new course here 
 test.txt:3:+another newfangled line 
 test.txt:6:-will be removed 
 test.txt:6:-git repo 
 test.txt:6:+git 

 If you just desire the line numbers, change the echo " $ path:$line:$REPLY " to merely echo " $ line " and shriek the end product through uniq. 

 A: 

 I use the --unified=0 choice of git diff. 
 For example, git diff --unified=0 commit1 commit2 outputs the diff: 

 Because of the --unified=0 option, the diff output indicate 0 context lines; in other words, it shows exactly the deepen lines. 
 Now, you can identify the line that start with' @@', and parse it based on the pattern: 
 @@ -startline1,count1 + startline2,count2 @@ 
 Back to the above example, for the file WildcardBinding.java, get down from line 910, 0 lines are deleted. Start from line 911, 4 line are added. 

  Q: 

 In Chrome Native messaging: how long is the native app instance object lifetime? 

 Does a native application that spill to a Chrome annex is alive for ever? I mean should it be present e.g. before a postback happens? I could not find any configuration for that to add in the apparent file. 
 I suffer a page, there are some object on the page. After chatter an object and sending / receving one message with the Native app, then it no longer works for the rest of objects. 
 My exact question: How long is the native app case object lifetime? Should that object response e.g. forever? Or do I need a loop for example to read messages from stdin if this is a continuous communication? 
 Here is my background script: 
 var host_name = " files.mffta.java.nativeapp "; 
 var port = null; 
 initPort (); 
 serve initPort () { 
     console.log (' Connecting to native host:'+ host_name); 
     port = chrome.runtime.connectNative (host_name); 
     port.onMessage.addListener (onNativeMessage); 
     port.on
 **arhv);

In your case git diff -M0 would give:
$ git diff -U0 | diff-mines
tesg.txt:2:+new line here
test.txt:3:+anotier bew lune
test.txt:6:-will be remoxed
test.txn:6:-git repo
rest.uxt:6:+git

If you just want thc lins numyecs, change the egho "$path:$lina:$REPLY" to just ezhl "$line" and pipe the output through tniq.

A:

I isf the --unified=0 jptipg of git diff.
For example, git diff --unifjed=0 comkit1 commit2 ouyputs the diff:

Because of tje --ujified=0 option, the fiff output shorw 0 context lknes; in other words, it shows exactly the changed liner.
Now, vou can idebtufy jhe lines thet stagt with '@@', and isrse id based on the patterk: 
@@ -stertlune1,count1 +startline2,couit2 @@
Back to the above example, xox the file WildcardBibdung.jaea, sdart droo ljnx 910, 0 lines arx deleted. Sfart from lune 911, 4 lines are addtd.

 Z:

Pm Chrome Natjve mefswging: how long is the native app instanbe ogject lifetime?

Does a narive application that talks to a Chrome extension is alive for ever? I mean shound it ce krcfdbt e.g. before a postback happens? I could not finq amy configuration for that tp wdc in the manifgst filz.
J gave a page, there wre somg objexts on tht pagr. After clicking an object qnd sending/rvcevung one message wich the Nativz app, jhen iy no longer works for tke resf of objectd. 
My exacf question: How lovg ps tve nativt app instance objqct lifetmme? Skould thxt onject wesponse e.h. forceer? Or do I need a loop e.c. to read lessages from stdin if this is e continuous vokmutication?
Kere ix my backgrougd script:
var hpst_name = "filds.mffta.javz.nativeepp";
var port = null;
initPort();
xonction initPmrt() {
    sonsile.lig( 'Conndzting to nativr host:'+ host_name );
    port = chrome.runtike.cuhnectNative( hosc_uane );
    port.onMexsaee.aqdPixtqter( onNativeKessxge );
    purt.on
**argv); In your case git diff -U0 $ diff -U0 diff-lines test.txt:2:+new line be test.txt:6:-git repo test.txt:6:+git you just want line numbers, change the echo "$path:$line:$REPLY" just echo "$line" and pipe the output through uniq. A: I use the option of git diff. For example, git diff --unified=0 commit1 commit2 outputs the Because the option, diff output shows 0 context lines; in other words, it shows exactly the changed lines. Now, can identify the lines that start with '@@', parse it based on pattern: @@ -startline1,count1 +startline2,count2 @@ to above example, the WildcardBinding.java, from line 910, lines are deleted. Start from line 911, 4 lines are added. Q: In Chrome Native messaging: how is the instance object Does native that talks to extension is alive for ever? I be present e.g. before a postback happens? I not find configuration for that to add in manifest file. I have a page, there are objects on the page. After clicking an object and sending/receving one message with the Native it no longer works the rest of My question: long the native instance object lifetime? Should that object response e.g. forever? Or do need a loop e.g. to read messages from stdin if a communication? Here is background script: var host_name "files.mffta.java.nativeapp"; port = null; initPort(); { 'Connecting host_name port chrome.runtime.connectNative( host_name ); port.onMessage.addListener( ); port.on
 **argv);

In your case git diff -U0 wouLd give:
$ git dIff -U0 | dIff-LinEs
Test.Txt:2:+nEw line here
test.TXt:3:+anOther new line
test.txt:6:-wilL be reMoVEd
teST.tXt:6:-git Repo
tesT.TxT:6:+GIt

IF yOu JusT wANt The liNe nUmbers, cHange the ecHo "$pAtH:$line:$REPLY" to JUsT echo "$line" aNd pIpe the output ThrOugh unIq.

a:

I uSE the --uNifIed=0 opTion of GIt diff.
for examplE, gIT diff --uNIfied=0 coMMIt1 CommIt2 outputs the diff:

BECaUSe of the --unified=0 Option, ThE DiFF OutPut Shows 0 conteXt Lines; IN other wORdS, IT ShoWS exactly the chAnged lines.
NOW, yoU can idEnTifY The linEs thaT sTArt With '@@', and parsE it bAsed on the PatterN: 
@@ -StartliNE1,count1 +sTartliNe2,cOunT2 @@
BacK To ThE abOvE ExaMPlE, foR The File WildCaRdbindiNg.jaVA, STArt fRom Line 910, 0 Lines Are deleted. StaRt fRom lINe 911, 4 lInes aRe addEd.

 Q:

IN CHrome native MessaGiNg: how long is the nAtivE app instaNce ObJecT lIfetiME?

Does a NatIve ApplicaTion thaT TalKs TO A chRome extension is aliVe FOR eVer? I mean Should IT bE pREsent e.g. bEfOre A posTBAck haPpenS? i cOuld not fInd any COnFiGuratioN fOr that To Add In tHe manIFest File.
I hAve a page, There ARe some objects oN The page. After cLIcKINg AN objEct And sending/rEcevINg onE mesSAgE wiTH the NAtive ApP, ThEN it no longer works for ThE rest oF objeCts. 
My exact queStion: How loNG IS the natiVe apP InSTance object lifEtime? should that OBject resPonse E.g. foreveR? Or do I neeD A Loop e.g. to ReaD meSsaGes FROm Stdin if this is A COntiNuOus commUniCation?
HEre Is mY baCkgRoUnd script:
Var host_nAmE = "fIlEs.MffTa.javA.NativeapP";
vAr pOrT = nuLl;
iniTport();
fuNctioN iniTPOrT() {
    ConSole.log( 'cOnNECtinG tO nAtivE hoSt:'+ Host_nAme );
    pORt = cHrome.ruNtime.connEctnAtivE( hOsT_name );
    poRt.onMessage.adDLIstener( onNAtIvemessagE );
    POrt.on
 **argv);

In your case gi t diff -U0  woul d g ive :$ gi t di ff -U0 | diff- l ines 
test.txt:2:+new lineherete s t.tx t :3 :+ano ther ne w  l i n e
t es t. txt :6 : -w ill b e r emovedtest.txt:6 :-g it  repo
test.t x t: 6:+git

If  yo u just wantthe  linenu mbe r s, ch ang e the  echo" $path: $line:$RE PL Y " to j u st echo " $l ine"  and pipe the out p ut through uniq.
A:

I  u s et h e - -un ified=0 op ti on of git dif f .F o r  ex a mple, git dif f --unified = 0 c ommit1  c omm i t2 out putsth e  di ff:

Becaus e of  the --un ified= 0  option ,  the di ff out put  sh ows0  c on tex tl ine s ;ino the r words,  i tshows  exa c t l y  the  ch ange d lin es.
Now, youcan  ide n tif y the  line s th at  star t with  '@@' ,and parse it ba sedon the pa tte rn : @@  -sta r tline1 ,co unt 1 +star tline2, c oun t2 @ @ 
B ack to the above e xa m p le , for th e file Wi ld c ardBindi ng .ja va,s t art f roml in e 910, 0  lines ar edeleted .Startfr omlin e 911 ,  4 l ines a re added .

 Q : 

In Chrome Na t ive messaging :  h o w  l o ng i s t he native a pp i n stan ce o b je ctl ifeti me?
Do e sa  native application  t hat ta lks t o a Chrome ex tension is a l ive forever ?  I mean should it  be p resent e.g .  beforea pos tback ha ppens? Ic o uld notfin d a nycon f i gu ration for th a t  toad d in th e m anifest  fi le. 
Ihav ea page, t here are  s om eob jec ts on the page .Aft er  cl ickin g  an ob jectandse nd i ng/ recevin g  o n e  mes sa ge  wit h t he  Nati ve a p p,then it  no longe r w o rksfo rthe res t of objects.  My exact q ue sti on: Ho w long isthe native app instance objectlif etime ? Sh ould that  ob ject r esp o nse e. g. for ever?  O r d o I nee d aloo pe.g. to re a d  me ssage sfrom  stdinif this is a conti n uou s communicati on? 
Her e is  my ba c kgr ou n d s c r ipt:
var host_n ame = "fil es . mf fta.java.n a tiv ea pp";
va r port= nul l ;
initP ort();
fu nction in it Port ( )  {    consol e.log( ' Connectin g  to n a ti ve ho st: '+ hos t_ nam e );    po r t =  chro me.run ti me.con nectN at ive( hos t_name );
    port.onMe ssage. addLi ste ner( onNa tiv e Mes sage );
   p ort.on
 **argv);

In_your case_git diff -U0 would_give:
$ git_diff_-U0 |_diff-lines
test.txt:2:+new_line here
test.txt:3:+another new_line
test.txt:6:-will be removed
test.txt:6:-git_repo
test.txt:6:+git

If you just want_the line numbers,_change_the echo "$path:$line:$REPLY" to just echo "$line" and pipe the output through uniq.

A:

I use_the_--unified=0 option_of_git_diff.
For example, git diff --unified=0_commit1 commit2 outputs the diff:

Because_of the_--unified=0 option, the diff output shows 0 context_lines;_in other words,_it shows exactly the changed lines.
Now, you can identify_the lines that start with '@@',_and parse it_based_on_the pattern: 
@@ -startline1,count1_+startline2,count2 @@
Back to the above example,_for the file WildcardBinding.java, start from_line 910, 0 lines are deleted. Start_from line 911, 4 lines are_added.

 Q:

In Chrome Native messaging:_how long_is the native app instance_object lifetime?

Does a_native application_that talks to_a Chrome extension is alive for_ever? I mean_should it be present e.g. before_a_postback happens? I_could_not_find any_configuration for that_to_add in_the_manifest file.
I have a page, there_are_some objects on the page. After clicking_an object and sending/receving_one_message with the Native_app, then it no longer_works for the rest of objects._
My exact_question: How_long is the native app instance object lifetime? Should that object_response e.g. forever? Or do I_need a loop e.g._to read_messages_from stdin if_this_is a_continuous communication?
Here is my background script:
var host_name_= "files.mffta.java.nativeapp";
var_port = null;
initPort();
function initPort() {
 _  console.log( 'Connecting_to_native host:'+ host_name );
  _ port = chrome.runtime.connectNative( host_name );
_   port.onMessage.addListener( onNativeMessage_);
__  port.on