Re: [PATCH] diff: handle "-" as abbreviation of '@{-1}'

2016-03-14 Thread Michael J Gruber
Please bottom post - see below. Javier Domingo Cansino venit, vidit, dixit 12.03.2016 03:48: > dash is usually used for representing stdin / stdout as a file. I > think this could drive to error... but I would agree with transforming > -h1 to @{-1} or -h2 to @{-2} (-h representing head). > > I

Re: [PATCH] diff: handle "-" as abbreviation of '@{-1}'

2016-03-11 Thread Javier Domingo Cansino
dash is usually used for representing stdin / stdout as a file. I think this could drive to error... but I would agree with transforming -h1 to @{-1} or -h2 to @{-2} (-h representing head). I do agree however that all those signs are thought with american keyboards in mind. All those punctuation

[PATCH] diff: handle "-" as abbreviation of '@{-1}'

2016-03-11 Thread Senorsen
Currently it just replace "-" in argv[] into "@{-1}". For example, git diff - equals to git diff @{-1} Signed-off-by: Senorsen --- Notes: Hello everyone, I'm Zhang Sen, a college student from Zhejiang University in China, and this is a patch for the