handle_revision_arg: record modes for "a..b" endpoints
commit101dd4de16eea300a59e432452fd4fc06e1ac7f2
authorJeff King <peff@peff.net>
Fri, 19 May 2017 12:55:11 +0000 (19 08:55 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 May 2017 01:59:27 +0000 (24 10:59 +0900)
tree674c8cc7e712dfa9a458c63e3a14c1df54cec7e2
parent74e89110a38fb52be29615a1468e86fb75077433
handle_revision_arg: record modes for "a..b" endpoints

The "a..b" revision syntax was designed to handle commits,
so it doesn't bother to record any mode we find while
traversing a "tree:path" endpoint. These days "git diff" can
diff blobs using either "a:path..b:path" (with dots) or
"a:path b:path" (without), but the two behave
inconsistently, as the with-dots version fails to notice the
mode.

Let's teach the dot-dot range parser to record modes; it
doesn't cost us anything, and it makes this case work.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c
t/t4063-diff-blobs.sh