Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Matthieu Moy <hidden>
Date: 2016-06-15 23:04:09

Yurii Shevtsov [off-list ref] 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
message.
Signed-off-by: Yurii Shevtsov <ungetch <at> gmail.com>
Please, use a real email adress, not a mangled one.
quoted hunk
--- 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(mode2))
-               return error("file/directory conflict: %s, %s", name1, name2);
I'm surprised to see this error message totally go away. The idea of the
microproject was to DWIM (do what I mean) better, but the dwim should
apply only when $directory/$file actually exists. Otherwise, the error
message should actually be raised.
--

I hope I understood task correct. I think this patch requires writing
additional tests, so that's what I'm going to do now.
This text should go between the --- and the diffstat, not at the end of
the message.

And yes, this deserves tests ;-).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help