Re: [PATCH/RFC][GSoC] make "git diff --no-index $directory $file" DWIM better.

2015-03-16 Thread Junio C Hamano
Yurii Shevtsov writes: > Yes, I have red what you wrote several times and tried your example. > I'm really sorry if I sound like I just ignored it. I just got a > little bit lost about which procedure needs patching. You're > absolutely right, queue_diff() is wrong place for it. So do you agree >

Re: [PATCH/RFC][GSoC] make "git diff --no-index $directory $file" DWIM better.

2015-03-16 Thread Yurii Shevtsov
Yes, I have red what you wrote several times and tried your example. I'm really sorry if I sound like I just ignored it. I just got a little bit lost about which procedure needs patching. You're absolutely right, queue_diff() is wrong place for it. So do you agree that "append the name of the file

Re: [PATCH/RFC][GSoC] make "git diff --no-index $directory $file" DWIM better.

2015-03-16 Thread Junio C Hamano
Yurii Shevtsov writes: >> ... As it stands now, even before we think about dwimming >> "diff D/ F" into "diff D/F F", a simple formulation like this will >> error out. >> >> $ mkdir -p a/sub b >> $ touch a/file b/file b/sub a/sub/file >> $ git diff --no-index a b >> error: file/d

Re: [PATCH/RFC][GSoC] make "git diff --no-index $directory $file" DWIM better.

2015-03-16 Thread Yurii Shevtsov
> Matthieu Moy writes: > >>> --- a/diff-no-index.c >>> +++ b/diff-no-index.c >>> @@ -97,8 +97,25 @@ static int queue_diff(struct diff_options *o, >>> if (get_mode(name1, &mode1) || get_mode(name2, &mode2)) >>> return -1; >>> >>> - if (mode1 && mode2 && S_ISDIR(mode1)

Re: [PATCH/RFC][GSoC] make "git diff --no-index $directory $file" DWIM better.

2015-03-15 Thread Junio C Hamano
Matthieu Moy writes: >> --- a/diff-no-index.c >> +++ b/diff-no-index.c >> @@ -97,8 +97,25 @@ static int queue_diff(struct diff_options *o, >> if (get_mode(name1, &mode1) || get_mode(name2, &mode2)) >> return -1; >> >> - if (mode1 && mode2 && S_ISDIR(mode1) != S_ISDIR

Re: [PATCH/RFC][GSoC] make "git diff --no-index $directory $file" DWIM better.

2015-03-15 Thread Junio C Hamano
Eric Sunshine writes: >>> Is this name supposed to stand for "dir'n'file",... > ...I personally find the idiomatic name 'path' > easier to grok, however, Junio, of course, has final say-so. If I were presented two identical patches, one calling it "path" and the other calling it "dirnfile", I wo

Re: [PATCH/RFC][GSoC] make "git diff --no-index $directory $file" DWIM better.

2015-03-15 Thread Eric Sunshine
[re-adding cc:git] On Sun, Mar 15, 2015 at 2:45 PM, Yurii Shevtsov wrote: >> On Sun, Mar 15, 2015 at 11:35 AM, Yurii Shevtsov wrote: >>> make "git diff --no-index $directory $file" DWIM better. >> >> Specify the area affected by the change, followed by a colon, followed >> by the change summary.

Re: [PATCH/RFC][GSoC] make "git diff --no-index $directory $file" DWIM better.

2015-03-15 Thread Junio C Hamano
Yurii Shevtsov writes: > Changes 'git diff --no-index $directory $file' behaviour. > Now it is transformed to 'git diff --no-index $directory/&file $file' > instead of throwing an error. Is this asymmetric? Shouldn't "git diff --no-index $file $directory" behave the same way, i.e. turned into "

Re: [PATCH/RFC][GSoC] make "git diff --no-index $directory $file" DWIM better.

2015-03-15 Thread t . gummerer
[re-added cc to the list] On 03/15, Yurii Shevtsov wrote: > Hi, and thank for your reply > > >> 1 files changed, 19 insertions(+), 2 deletions(-) > >> > >> diff --git a/diff-no-index.c b/diff-no-index.c > >> index 265709b..4e71b36 100644 > >> --- a/diff-no-index.c > >> +++ b/diff-no-index.c > >>

Re: [PATCH/RFC][GSoC] make "git diff --no-index $directory $file" DWIM better.

2015-03-15 Thread Eric Sunshine
In addition to the points raised by Matthieu and Thomas... On Sun, Mar 15, 2015 at 11:35 AM, Yurii Shevtsov wrote: > make "git diff --no-index $directory $file" DWIM better. Specify the area affected by the change, followed by a colon, followed by the change summary. Drop the period at the end.

Re: [PATCH/RFC][GSoC] make "git diff --no-index $directory $file" DWIM better.

2015-03-15 Thread t . gummerer
Hi, On 03/15, Yurii Shevtsov wrote: > Changes 'git diff --no-index $directory $file' behaviour. > Now it is transformed to 'git diff --no-index $directory/&file $file' > instead of throwing an error. The commit message should describe why the change is made, see Documentation/SubmittingPatches, s

Re: [PATCH/RFC][GSoC] make "git diff --no-index $directory $file" DWIM better.

2015-03-15 Thread Matthieu Moy
Yurii Shevtsov writes: > Changes 'git diff --no-index $directory $file' behaviour. > Now it is transformed to 'git diff --no-index $directory/&file $file' I guess the & should be a $. > instead of throwing an error. Try to insist on _why_ you did this more than what it does in the commit messa

[PATCH/RFC][GSoC] make "git diff --no-index $directory $file" DWIM better.

2015-03-15 Thread Yurii Shevtsov
Changes 'git diff --no-index $directory $file' behaviour. Now it is transformed to 'git diff --no-index $directory/&file $file' instead of throwing an error. Signed-off-by: Yurii Shevtsov gmail.com> --- diff-no-index.c | 21 +++-- 1 files changed, 19 insertions(+), 2 deletions(