Re: [PATCH v3 07/28] t1007: annotate with SHA1 prerequisite
- From
Stefan Beller <sbeller@google.com>
- Date
- May 16, 2018, 16:56 UTC
- Message-ID
- <CAGZ79kZ3UVYgu6xO9OCT9ZZfarhmZ+iG+J0nMNzfnZ_jrnu8ag@mail.gmail.com>
- In-Reply-To
- <20180516015630.661349-8-sandals@crustytoothpaste.net>
Hi brian,
On Tue, May 15, 2018 at 6:56 PM, brian m. carlson <sandals@crustytoothpaste.net> wrote:
Show 29 quoted lines
> Since this is a core test that tests basic functionality, annotate the
> assertions that have dependencies on SHA-1 with the appropriate
> prerequisite.
>
> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
> ---
> t/t1007-hash-object.sh | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh
> index 532682f51c..a37753047e 100755
> --- a/t/t1007-hash-object.sh
> +++ b/t/t1007-hash-object.sh
> @@ -9,13 +9,13 @@ echo_without_newline() {
> }
>
> test_blob_does_not_exist() {
> - test_expect_success 'blob does not exist in database' "
> + test_expect_success SHA1 'blob does not exist in database' "
> test_must_fail git cat-file blob $1
> "
> }
>
> test_blob_exists() {
> - test_expect_success 'blob exists in database' "
> + test_expect_success SHA1 'blob exists in database' "
> git cat-file blob $1
> "
> }For the 2 occurrences above I think the SHA1 requirement is not needed as the check if a blob exists (and the id is given as $1) is independent of the hash function, it is just important that the same hash function is used in the git-cat-file as well as...
Show 7 quoted lines
> @@ -73,19 +73,19 @@ test_expect_success "Can't use --path with --no-filters" ' > > push_repo > > -test_expect_success 'hash a file' ' > +test_expect_success SHA1 'hash a file' ' > test $hello_sha1 = $(git hash-object hello)
... here, where we create the blob to test without writing it into the object database. In a way we test that the absence of -w works correctly.
Oh, the $hello_sha1 is hard coded, which is why we think this test is SHA1 dependent.
But that would fit in line with the test_blob[_does_not]_exist being independent of the hashes?
Stefan