From: Junio C Hamano <gitster@pobox•com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] diff: restrict pathspec limitations to diff b/f case only
Date: Wed, 20 Nov 2013 14:43:58 -0800 [thread overview]
Message-ID: <xmqqvbzm66dt.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: 1384910801-11125-1-git-send-email-pclouds@gmail.com
Nguyễn Thái Ngọc Duy <pclouds@gmail•com> writes:
> builtin_diff_b_f() needs a path, not pathspec. Other modes in diff
> can deal with pathspec just fine. But because of the current
> GUARD_PATHSPEC() location, other modes also reject :(glob) and
> :(icase).
>
> Move GUARD_PATHSPEC(), and the "path" assignment statement, which is
> the reason of this GUARD_PATHSPEC(), inside builtin_diff_b_f().
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail•com>
> ---
Makes sense.
Let me squash this in.
diff --git a/t/t6131-pathspec-icase.sh b/t/t6131-pathspec-icase.sh
index 8d4a7fc..a7c7ff5 100755
--- a/t/t6131-pathspec-icase.sh
+++ b/t/t6131-pathspec-icase.sh
@@ -100,4 +100,10 @@ test_expect_success 'match_pathspec_depth matches :(icase)bar with empty prefix'
test_cmp expect actual
'
+test_expect_success '"git diff" can take magic :(icase) pathspec' '
+ echo FOO/BAR >expect &&
+ git diff --name-only HEAD^ HEAD -- ":(icase)foo/bar" >actual &&
+ test_cmp expect actual
+'
+
test_done
Thanks.
next prev parent reply other threads:[~2013-11-20 22:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-20 1:26 [PATCH] diff: restrict pathspec limitations to diff b/f case only Nguyễn Thái Ngọc Duy
2013-11-20 22:43 ` Junio C Hamano [this message]
2013-11-21 6:44 ` [PATCH 1/2] glossary-content.txt: remove an obsolete paragrah Nguyễn Thái Ngọc Duy
2013-11-21 6:44 ` [PATCH 2/2] glossary-content.txt: fix documentation of "**" patterns Nguyễn Thái Ngọc Duy
2013-11-21 18:13 ` [PATCH 1/2] glossary-content.txt: remove an obsolete paragrah Junio C Hamano
2013-11-21 23:55 ` Junio C Hamano
2013-11-22 1:36 ` Duy Nguyen
2013-11-22 5:40 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqvbzm66dt.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=pclouds@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox