]> git.ipfire.org Git - thirdparty/git.git/commit
clone: test for our behavior on odd objects/* content
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 10 Jul 2019 23:58:55 +0000 (20:58 -0300)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Jul 2019 20:52:15 +0000 (13:52 -0700)
commit03156169270509dc2ecba8324497c9088c4272ed
treec7ff5e2aa6c5f03947214b2ccdf0042a717cc417
parentc0e78f7e4687e7bd5ff0b83974b28c1cc81c5487
clone: test for our behavior on odd objects/* content

Add tests for what happens when we perform a local clone on a repo
containing odd files at .git/object directory, such as symlinks to other
dirs, or unknown files.

I'm bending over backwards here to avoid a SHA-1 dependency. See [1]
for an earlier and simpler version that hardcoded SHA-1s.

This behavior has been the same for a *long* time, but hasn't been
tested for.

There's a good post-hoc argument to be made for copying over unknown
things, e.g. I'd like a git version that doesn't know about the
commit-graph to copy it under "clone --local" so a newer git version
can make use of it.

In follow-up commits we'll look at changing some of this behavior, but
for now, let's just assert it as-is so we'll notice what we'll change
later.

1. https://public-inbox.org/git/20190226002625.13022-5-avarab@gmail.com/

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
[matheus.bernardino: improved and split tests in more than one patch]
Helped-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5604-clone-reference.sh