Re: [PATCH v2 1/2] [Outreachy] t3903-stash: test without configured user.name and user.email

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

 



Slavica Djukic <slavicadj.ip2018@xxxxxxxxx> writes:

>> Yes, but for that you'd need to be checking the resulting commit
>> object that represents the stash entry.  It should be created under
>> the substitute identity.
> Would it be correct to check it like this:
>
>         git reset &&
>         >1 &&
>         git add 1 &&
>         echo "$GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>" >expect &&
>         git stash &&
>         git show -s --format="%an <%ae>" refs/stash >actual &&
>         test_cmp expect actual

So, you create a stash, and grab %an and %ae out of the resulting
commit object and store them in actual, and then compare.  Makes
sense.




[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