From: Junio C Hamano <gitster@pobox.com>
To: Joanna Wang <jojwang@google.com>
Cc: git@vger.kernel.org, sunshine@sunshineco.com, tboegi@web.de
Subject: Re: [PATCH 1/1] attr: add builtin objectmode values support
Date: Thu, 16 Nov 2023 16:57:26 +0900 [thread overview]
Message-ID: <xmqqmsveqgex.fsf@gitster.g> (raw)
In-Reply-To: <20231116054437.2343549-1-jojwang@google.com> (Joanna Wang's message of "Thu, 16 Nov 2023 05:44:37 +0000")
Joanna Wang <jojwang@google.com> writes:
> diff --git a/t/t6135-pathspec-with-attrs.sh b/t/t6135-pathspec-with-attrs.sh
> index a9c1e4e0ec..b08a32ea68 100755
> --- a/t/t6135-pathspec-with-attrs.sh
> +++ b/t/t6135-pathspec-with-attrs.sh
> @@ -295,4 +295,29 @@ test_expect_success 'reading from .gitattributes in a subdirectory (3)' '
> test_cmp expect actual
> '
>
> +test_expect_success 'pathspec with builtin_objectmode attr can be used' '
> + >mode_exec_file_1 &&
> +
> + git status -s ":(attr:builtin_objectmode=100644)mode_exec_*" >actual &&
> + echo ?? mode_exec_file_1 >expect &&
> + test_cmp expect actual &&
> +
> + git add mode_exec_file_1 && chmod +x mode_exec_file_1 &&
This again would break with filesystems that are incapable of
supporting executable bit natively. Writing one command per line,
doing something like this may help
git add mode_exec_file_1 &&
git update-index --chmod=+x mode_exec_file_1 &&
> + git status -s ":(attr:builtin_objectmode=100755)mode_exec_*" >actual &&
> + echo AM mode_exec_file_1 >expect &&
> + test_cmp expect actual
> +'
> +
> +test_expect_success 'builtin_objectmode attr can be excluded' '
> + >mode_1_regular &&
> + >mode_1_exec && chmod +x mode_1_exec &&
Ditto.
> + git status -s ":(exclude,attr:builtin_objectmode=100644)" "mode_1_*" >actual &&
> + echo ?? mode_1_exec >expect &&
> + test_cmp expect actual &&
> +
> + git status -s ":(exclude,attr:builtin_objectmode=100755)" "mode_1_*" >actual &&
> + echo ?? mode_1_regular >expect &&
> + test_cmp expect actual
> +'
> +
> test_done
prev parent reply other threads:[~2023-11-16 7:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-14 2:28 [PATCH 1/1] attr: add native file mode values support Joanna Wang
2023-11-14 2:52 ` Junio C Hamano
2023-11-14 21:49 ` [PATCH 1/1] attr: add builtin objectmode " Joanna Wang
2023-11-16 1:26 ` Junio C Hamano
2023-11-16 1:37 ` Eric Sunshine
2023-11-16 2:53 ` Junio C Hamano
2023-11-16 5:44 ` Joanna Wang
2023-11-16 6:17 ` Junio C Hamano
2023-11-16 8:08 ` Junio C Hamano
2023-11-16 17:54 ` Joanna Wang
2023-12-01 4:01 ` Joanna Wang
2023-12-12 23:17 ` Junio C Hamano
2023-12-20 20:07 ` Junio C Hamano
2024-01-12 6:12 ` Joanna Wang
2023-11-16 7:57 ` Junio C Hamano [this message]
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=xmqqmsveqgex.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jojwang@google.com \
--cc=sunshine@sunshineco.com \
--cc=tboegi@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.