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]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Slavica Djukic <slavicadj.ip2018@xxxxxxxxx> writes:
>
>> +test_expect_failure 'stash works when user.name and user.email are not set' '
>> +	git reset &&
>> +	git var GIT_COMMITTER_IDENT >expected &&
> ...
> Anyway, we grab the committer ident we use by default during the
> test with this command.  OK.
>
>> +	>1 &&
>> +	git add 1 &&
>> +	git stash &&
>
> And we make sure we can create stash.
>
>> +	git var GIT_COMMITTER_IDENT >actual &&
>> +	test_cmp expected actual &&
>
> I am not sure what you are testing with this step.  There is nothing
> that changed environment variables or configuration since we ran
> "git var" above.  Why does this test suspect that somebody in the
> future may break the expectation that after running 'git add' and/or
> 'git stash', our committer identity may have been changed, and how
> would such a breakage happen?

Just a note.

"git var GIT_COMMITTER_IDENT" has timestamp in it, so a naïve reader
might wonder what would happen if "git add 1" and "git stash" took
more than one second.  But it won't be a problem in this case as the
committer date comes from the environment GIT_COMMITTER_DATE, which
is set to a fixed known value and is incremented only by calling
test_commit helper function, which does not happen between the two
"git var" calls.

In any case, I am not sure I understand the point of comparing two
output from "git var" invocations we see ablve in this test.




[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