Here are a few patches to scratch my itches in "diff --no-index" I have had for quite some time, but didn't feel strong enough to fix them myself so far. The first one is to make "diff File Directory" (and "diff Directory File") more useful by aligning its behaviour with more mainstream "diff" implementations. We used to complain that one is a file and the other is a directory and died without doing anything useful. Instead, we pretend as if the user asked to compare "diff File Directory/File" (or vice versa), which is what GNU diff does. The second one on the other hand is to make it behave more like the normal "git diff" when comparing two directories, when one directory has a path as a file while the other directory has the same path as a directory. GNU diff punts and says "File D1/path is a regular file while file D2/path is a directory" in such a case, and that is what "diff --no-index" does, too, but when the normal "git diff" compares two such trees, we show a removal of the file and creations of all the files in the directory (or vice versa). With this patch, we teach "diff --no-index" codepath to do the same, which would be more in line with the spirit of "diff --no-index", which is to make "git diff" goodies available to people who compare paths outside control of any git repository. Junio C Hamano (2): diff-no-index: DWIM "diff D F" into "diff D/F F" diff: align D/F handling of "diff --no-index" with that of normal Git diff-no-index.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++-- t/t4053-diff-no-index.sh | 34 +++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 2 deletions(-) -- 2.3.4-475-g3180e2e -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html