[PATCH/RFC][GSoC] diff-no-index: transform $directory $file args to $directory/$file $file

2015-03-21 Thread Yurii Shevtsov
git diff --no-index refuses to compare if args are directory and file, instead of usual diff. Now git diff --no-index compares args' target names and, if they are equal, refuses to compare. If args differ, it transforms args and diffs files, as usual diff does. This is the least expensive way in

Re: [PATCH/RFC][GSoC] diff-no-index: transform $directory $file args to $directory/$file $file

2015-03-21 Thread Yurii Shevtsov
diff --git a/diff-no-index.c b/diff-no-index.c index 265709b..9a3439a 100644 --- a/diff-no-index.c +++ b/diff-no-index.c @@ -97,8 +97,39 @@ static int queue_diff(struct diff_options *o, if (get_mode(name1, mode1) || get_mode(name2, mode2)) return -1; -if (mode1 mode2

Re: [PATCH/RFC][GSoC] diff-no-index: transform $directory $file args to $directory/$file $file

2015-03-21 Thread Junio C Hamano
Yurii Shevtsov unge...@gmail.com writes: diff --git a/diff-no-index.c b/diff-no-index.c index 265709b..9a3439a 100644 --- a/diff-no-index.c +++ b/diff-no-index.c @@ -97,8 +97,39 @@ static int queue_diff(struct diff_options *o, if (get_mode(name1, mode1) || get_mode(name2, mode2))

Re: [PATCH/RFC][GSoC] diff-no-index: transform $directory $file args to $directory/$file $file

2015-03-21 Thread Eric Sunshine
On Sat, Mar 21, 2015 at 8:50 AM, Yurii Shevtsov unge...@gmail.com wrote: Signed-off-by: Yurii Shevtsov unge...@gmail.com --- diff --git a/diff-no-index.c b/diff-no-index.c index 265709b..9a3439a 100644 --- a/diff-no-index.c +++ b/diff-no-index.c @@ -97,8 +97,39 @@ static int