Re: [PATCH 1/1] attr: add builtin objectmode values support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 15, 2023 at 8:26 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Joanna Wang <jojwang@xxxxxxxxxx> writes:
> > +test_expect_success 'native object mode attributes work with --cached' '
> > +     >normal && attr_check_object_mode normal unspecified --cached &&
> > +     git add normal && attr_check_object_mode normal 100644 --cached
> > +'
>
> For "--cached test", on the other hand, we should be able to set the
> executable bit or record a symbolic link regardless of the
> filesystem using "update-index", e.g.,
>
>         empty_blob=$(git rev-parse :normal)
>         cat <<-EOF | git update-index --index-info
>         100755 $empty_blob 0    exec
>         120000 $empty_blob 0    symlink
>         EOF
>
> or something.

A bit more idiomatic in this codebase would be:

        git update-index --index-info <<-EOF
        100755 $empty_blob 0    exec
        120000 $empty_blob 0    symlink
        EOF

No need for `cat`.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux