Re: [PATCH] diff --no-index: support more than one file pair

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] diff --no-index: support more than one file pair

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:52:47

Nguyễn Thái Ngọc Duy [off-list ref] writes:
This allows you to do

git diff --no-index file1.old file1.new file2.old file2.new...

It could be seen as an abuse of "git --no-index", but it's very
tempting considering many bells and whistles git's diff machinery
provides.
I find this very, very unintuitive. I tried with GNU diff:

diff 1 2 3 4

and it complained with "diff: extra operand `3'". I find

git diff --no-index file1.old file1.new
git diff --no-index file2.old file2.new

far more intuitive, less error prone (when you start having a
non-trivial list of arguments, it's hard to tell which is the new and
which is the old visually), ... So I'm curious why you prefer your
syntax.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

Re: [PATCH] diff --no-index: support more than one file pair

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:52:47

2012/1/12 Matthieu Moy [off-list ref]:
Nguyễn Thái Ngọc Duy [off-list ref] writes:
quoted
This allows you to do

git diff --no-index file1.old file1.new file2.old file2.new...

It could be seen as an abuse of "git --no-index", but it's very
tempting considering many bells and whistles git's diff machinery
provides.
I find this very, very unintuitive. I tried with GNU diff:

diff 1 2 3 4

and it complained with "diff: extra operand `3'". I find

git diff --no-index file1.old file1.new
git diff --no-index file2.old file2.new

far more intuitive, less error prone (when you start having a
non-trivial list of arguments, it's hard to tell which is the new and
which is the old visually), ... So I'm curious why you prefer your
syntax.
Single operation has its advantages:

 - one pager
 - one stat and summary
 - might be easier to script (just throw them all to xargs)
 - hell, i might even benefit from git copy/modify detection
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help